Re: [sqlite] Transaction control At the SQL Level

2009-04-30 Thread Joanne Pham
Again thanks Igor for detail information about autocommit for the sqlite 
database connection.
Thanks,
JP





From: Igor Tandetnik 
To: sqlite-users@sqlite.org
Sent: Thursday, April 30, 2009 10:24:16 AM
Subject: Re: [sqlite] Transaction control At the SQL Level

Joanne Pham  wrote:
> Just want to make sure that I am fully understand about the single
> database connection with multiple database statement handle here.
> For example I have one database connection and 2 database statement
> handle using the same connection. Using the first database statement
> handle I use to select the data from database but not yet
> sqlite3_reset nor sqlite3_finalize. The second database statement
> handle I use to delete the data from database and use sqlite3_reset
> or sqlite3_finalize for the second database handle statement. So
> "delete" statement of the second database statement handle doesn't
> commit to the database until the first database statement handle
> sqlite3_reset or sqlite3_finalize right.

Correct.

Igor Tandetnik



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Transaction control At the SQL Level

2009-04-30 Thread Igor Tandetnik
Joanne Pham  wrote:
> Just want to make sure that I am fully understand about the single
> database connection with multiple database statement handle here.
> For example I have one database connection and 2 database statement
> handle using the same connection. Using the first database statement
> handle I use to select the data from database but not yet
> sqlite3_reset nor sqlite3_finalize. The second database statement
> handle I use to delete the data from database and use sqlite3_reset
> or sqlite3_finalize for the second database handle statement. So
> "delete" statement of the second database statement handle doesn't
> commit to the database until the first database statement handle
> sqlite3_reset or sqlite3_finalize right.

Correct.

Igor Tandetnik



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Transaction control At the SQL Level

2009-04-30 Thread Joanne Pham
Thanks a lot Igor respond my email.
Just want to make sure that I am fully understand about the single database 
connection with multiple database statement handle here.
For example I have one database connection and 2 database statement handle 
using the same connection. Using the first database statement handle I use to 
select the data from database but not yet 
sqlite3_reset nor sqlite3_finalize. The second database statement handle I use 
to delete the data from database and use sqlite3_reset or sqlite3_finalize for 
the second database handle statement.
So "delete" statement of the second database statement handle doesn't commit to 
the database until the first database statement handle sqlite3_reset or 
sqlite3_finalize right.
Once again thank for respond my email
JP




From: Igor Tandetnik 
To: sqlite-users@sqlite.org
Sent: Wednesday, April 29, 2009 7:48:41 PM
Subject: Re: [sqlite] Transaction control At the SQL Level

"Joanne Pham" 
wrote in message news:464293.67815...@web90308.mail.mud.yahoo.com
> 1) : If I have mulitple commands which are used the same SQL database
> connection then all commands after the first won't commit to the
> database if the first one is not completed"

Correct.

> 2) Is that sqlite3_reset will be the command to completed the
> statement?

That, or sqlite3_finalize.

> 3) From document above it seems like the "Autocommited" is for each
> SQLite database connection - So if I have serveral commands are using
> the same connection then is there any command that I can use to
> commit each individual command but not wait until the first statement
> finishes.

No.

Igor Tandetnik 



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Transaction control At the SQL Level

2009-04-29 Thread Igor Tandetnik
"Joanne Pham" 
wrote in message news:464293.67815...@web90308.mail.mud.yahoo.com
> 1) : If I have mulitple commands which are used the same SQL database
> connection then all commands after the first won't commit to the
> database if the first one is not completed"

Correct.

> 2) Is that sqlite3_reset will be the command to completed the
> statement?

That, or sqlite3_finalize.

> 3) From document above it seems like the "Autocommited" is for each
> SQLite database connection - So if I have serveral commands are using
> the same connection then is there any command that I can use to
> commit each individual command but not wait until the first statement
> finishes.

No.

Igor Tandetnik 



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Transaction control At the SQL Level

2009-04-29 Thread Joanne Pham
Hi All,
I read the document about "File Locking And Concurrency IN SQLite Version 3" 
about the "Transaction Control At The SQL Level" as below:
   "If multiple commands are being executed against the same SQLite database 
connection at the same time, the autocommit is deferred until the very last 
command completes. For example, if a SELECT statement is being executed, the 
execution of the command will pause as each row of the result is returned. 
During this pause other INSERT, UPDATE, or DELETE commands can be executed 
against other tables in the database. But none of these changes will commit 
until the original SELECT statement finishes"

So I have serveral questions:
    1) : If I have mulitple commands which are used the same SQL database 
connection then all commands after the first won't commit to the database if 
the first one is not completed"
    2) Is that sqlite3_reset will be the command to completed the statement?
    3) From document above it seems like the "Autocommited" is for each SQLite 
database connection - So if I have serveral commands are using the same 
connection then is there any command that I can use to commit each individual 
command but not wait until the first statement finishes.
Thanks,
JP


  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users