hi,
I am currently using sqlite version 3.5.9  on WinCE 5.0.  As per the posts
in the forums I do understand that when a cursor is open on a connection we
cannot update the database using transactions on the same thread.

open cursor...
begin transaction;
update statements....
commit transaction.
finalize cursor

But I found the below post in the forums which suggests different methods
for updating the database using transactions when a cursor is open.
http://www.mail-archive.com/sqlite-users@sqlite.org/msg08044.html

I tried the first method in the post .. But I am still getting SQLITE_ERROR
.. with the error description as "cannot commit transaction - SQL statements
in progress".

Some tips on the queries listed below may help me in resolving the issue.

1) Do the methods mentioned in the link above still hold or am I missing
something... ??

2) The whole reason of using the transactions is to increase the speed as
the updates take time on USB disks. Is there any other way of increasing the
speed other than PRAGMA synchronous= OFF and PRAGMA journal_mode = OFF ??

3) Can updating the database using transaction from different threads with
work around solve this issue? If yes, then I would be greatful if the
details of the work around are provided.

4) If I update the database in the below mentioned sequence without
transactions then everything works fine
           open cursor...
           update statements....
           finalize cursor
     As per the sqlite documentation every statement that is executed is
treated as a transaction  and the database is updated even if the cursor is
open.How is this transaction in auto commit mode different from the
transactions  created by  using "begin  transaction" and "commit
transactions"??


/cheers,
Yatin Salian


The people who mind don't matter and the people who matter don't mind.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to