Page 1 of 1

Controlling SQLite transactions

Posted: Thu Oct 15, 2009 12:23 am
by phaworth
I need the ability to define sequences of SQLite statements as transactions. The dictionary shows me command to issue COMMIT and ROLLBACK commands but I don;t see anything that will issue a BEGIN. Am I missing something? Do I have to use revExecuteSQL to issue a BEGIN?

In addition, the command/function that issues a ROLLBACK doesn't provide a way to include the SAVEPOINT parameter of the ROLLBACK command. Does this mean I have to use revExecuteSQL again?

Thanks,
Pete

Posted: Thu Oct 15, 2009 1:51 am
by trevordevore
Skip the RevDB calls and just execute the BEGIN, COMMIT and ROLLBACK commands yourself with revExecuteSQL.

With Rev 4.0 the SQLite driver has been updated to 3.6.17 which has support for savepoints. So if you have that driver you can use savepoints with revExecuteSQL.

Posted: Thu Oct 15, 2009 1:57 am
by phaworth
Thanks Trevor, had pretty much come to that conclusion.

I guess I'm not sure about 4.0. IS it publicly released or still in beta?

Pete

Posted: Thu Oct 15, 2009 1:59 am
by trevordevore
Still in Beta. You could *probably* just snatch the dbsqlite.dll/.bundle that comes with 4.0 and use it in a 3.5 installation though if you need savepoints.