Re: [sqlite] Roll-back
Yes, it worked after I added 'begin' and 'end' at the beginning and at the end of my transaction: db.exec("begin;"+ "select * from t1; " + "delete from t1 where t1key = 1; " + "insert into t1(data,num) values('Speedy', 3); " + "select * from t1;"+ "select * from t106;"+ "end;", cb); db.exec("rollback", cb); Thanks Benedetta Turchi Engineering Tools Engineering Tools Website John Stanton <[EMAIL PROTECTED]> 28/11/2006 18:14 Please respond to sqlite-users@sqlite.org To sqlite-users@sqlite.org cc Subject Re: [sqlite] Roll-back That should not stop you from starting a transaction and committing it. Note that Sqlite will automatically wrap your SQL in a transaction is you don't specify one. [EMAIL PROTECTED] wrote: > Thanks, but the problem is that I am using this SQLite Java Wrapper > library: > http://www.ch-werner.de/javasqlite/ > > and it looks like the only way I have to execute sql statements is to use > the following commands: > - Database.compile() > - Database.exec() > > unfortunately no roll-back > > Benedetta Turchi > Engineering Tools > Engineering Tools Website > > > > John Stanton <[EMAIL PROTECTED]> > 28/11/2006 17:12 > Please respond to > sqlite-users@sqlite.org > > > To > sqlite-users@sqlite.org > cc > > Subject > Re: [sqlite] Roll-back > > > > > > > Issue ROLLBACK instead of COMMIT for your transaction. If you have > already issued COMMIT it is too late. > > [EMAIL PROTECTED] wrote: > >>Hi, >> >>how can I 'roll-back' some modifications done by some previous sql >>statements with SQLite? >> >>Thank you >> >>Benedetta Turchi >>Engineering Tools >>Engineering Tools Website >> >> >> >> >>- >>*** >>*** Symbian Software Ltd is a company registered in England and >>Wales with registered number 4190020 and registered office at 2-6 >>Boundary Row, Southwark, London, SE1 8HP, UK. This message is >>intended only for use by the named addressee and may contain >>privileged and/or confidential information. If you are not the >>named addressee you should not disseminate, copy or take any action >>in reliance on it. If you have received this message in error >>please notify [EMAIL PROTECTED] and delete the message and any >>attachments accompanying it immediately. Neither Symbian nor any of >>its Affiliates accepts liability for any corruption, interception, >>amendment, tampering or viruses occurring to this message in >>transit or for any message sent by its employees which is not in >>compliance with Symbian corporate policy. * >>* >> > > > > - > To unsubscribe, send email to [EMAIL PROTECTED] > - > > > > > > - > *** > *** Symbian Software Ltd is a company registered in England and > Wales with registered number 4190020 and registered office at 2-6 > Boundary Row, Southwark, London, SE1 8HP, UK. This message is > intended only for use by the named addressee and may contain > privileged and/or confidential information. If you are not the > named addressee you should not disseminate, copy or take any action > in reliance on it. If you have received this message in error > please notify [EMAIL PROTECTED] and delete the message and any > attachments accompanying it immediately. Neither Symbian nor any of > its Affiliates accepts liability for any corruption, interception, > amendment, tampering or viruses occurring to this message in > transit or for any message sent by its employees which is not in > compliance with Symbian corporate policy. * > * > - To unsubscribe, send email to [EMAIL PROTECTED] - - *** *** Symbian Software Ltd is a company registered in
Re: [sqlite] Roll-back
That should not stop you from starting a transaction and committing it. Note that Sqlite will automatically wrap your SQL in a transaction is you don't specify one. [EMAIL PROTECTED] wrote: Thanks, but the problem is that I am using this SQLite Java Wrapper library: http://www.ch-werner.de/javasqlite/ and it looks like the only way I have to execute sql statements is to use the following commands: - Database.compile() - Database.exec() unfortunately no roll-back Benedetta Turchi Engineering Tools Engineering Tools Website John Stanton <[EMAIL PROTECTED]> 28/11/2006 17:12 Please respond to sqlite-users@sqlite.org To sqlite-users@sqlite.org cc Subject Re: [sqlite] Roll-back Issue ROLLBACK instead of COMMIT for your transaction. If you have already issued COMMIT it is too late. [EMAIL PROTECTED] wrote: Hi, how can I 'roll-back' some modifications done by some previous sql statements with SQLite? Thank you Benedetta Turchi Engineering Tools Engineering Tools Website - *** *** Symbian Software Ltd is a company registered in England and Wales with registered number 4190020 and registered office at 2-6 Boundary Row, Southwark, London, SE1 8HP, UK. This message is intended only for use by the named addressee and may contain privileged and/or confidential information. If you are not the named addressee you should not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify [EMAIL PROTECTED] and delete the message and any attachments accompanying it immediately. Neither Symbian nor any of its Affiliates accepts liability for any corruption, interception, amendment, tampering or viruses occurring to this message in transit or for any message sent by its employees which is not in compliance with Symbian corporate policy. * * - To unsubscribe, send email to [EMAIL PROTECTED] - - *** *** Symbian Software Ltd is a company registered in England and Wales with registered number 4190020 and registered office at 2-6 Boundary Row, Southwark, London, SE1 8HP, UK. This message is intended only for use by the named addressee and may contain privileged and/or confidential information. If you are not the named addressee you should not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify [EMAIL PROTECTED] and delete the message and any attachments accompanying it immediately. Neither Symbian nor any of its Affiliates accepts liability for any corruption, interception, amendment, tampering or viruses occurring to this message in transit or for any message sent by its employees which is not in compliance with Symbian corporate policy. * * - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Roll-back
Thanks, but the problem is that I am using this SQLite Java Wrapper library: http://www.ch-werner.de/javasqlite/ and it looks like the only way I have to execute sql statements is to use the following commands: - Database.compile() - Database.exec() unfortunately no roll-back Benedetta Turchi Engineering Tools Engineering Tools Website John Stanton <[EMAIL PROTECTED]> 28/11/2006 17:12 Please respond to sqlite-users@sqlite.org To sqlite-users@sqlite.org cc Subject Re: [sqlite] Roll-back Issue ROLLBACK instead of COMMIT for your transaction. If you have already issued COMMIT it is too late. [EMAIL PROTECTED] wrote: > Hi, > > how can I 'roll-back' some modifications done by some previous sql > statements with SQLite? > > Thank you > > Benedetta Turchi > Engineering Tools > Engineering Tools Website > > > > > - > *** > *** Symbian Software Ltd is a company registered in England and > Wales with registered number 4190020 and registered office at 2-6 > Boundary Row, Southwark, London, SE1 8HP, UK. This message is > intended only for use by the named addressee and may contain > privileged and/or confidential information. If you are not the > named addressee you should not disseminate, copy or take any action > in reliance on it. If you have received this message in error > please notify [EMAIL PROTECTED] and delete the message and any > attachments accompanying it immediately. Neither Symbian nor any of > its Affiliates accepts liability for any corruption, interception, > amendment, tampering or viruses occurring to this message in > transit or for any message sent by its employees which is not in > compliance with Symbian corporate policy. * > * > - To unsubscribe, send email to [EMAIL PROTECTED] - - *** *** Symbian Software Ltd is a company registered in England and Wales with registered number 4190020 and registered office at 2-6 Boundary Row, Southwark, London, SE1 8HP, UK. This message is intended only for use by the named addressee and may contain privileged and/or confidential information. If you are not the named addressee you should not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify [EMAIL PROTECTED] and delete the message and any attachments accompanying it immediately. Neither Symbian nor any of its Affiliates accepts liability for any corruption, interception, amendment, tampering or viruses occurring to this message in transit or for any message sent by its employees which is not in compliance with Symbian corporate policy. * *
Re: [sqlite] Roll-back
Issue ROLLBACK instead of COMMIT for your transaction. If you have already issued COMMIT it is too late. [EMAIL PROTECTED] wrote: Hi, how can I 'roll-back' some modifications done by some previous sql statements with SQLite? Thank you Benedetta Turchi Engineering Tools Engineering Tools Website - *** *** Symbian Software Ltd is a company registered in England and Wales with registered number 4190020 and registered office at 2-6 Boundary Row, Southwark, London, SE1 8HP, UK. This message is intended only for use by the named addressee and may contain privileged and/or confidential information. If you are not the named addressee you should not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify [EMAIL PROTECTED] and delete the message and any attachments accompanying it immediately. Neither Symbian nor any of its Affiliates accepts liability for any corruption, interception, amendment, tampering or viruses occurring to this message in transit or for any message sent by its employees which is not in compliance with Symbian corporate policy. * * - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Roll-back
[EMAIL PROTECTED] wrote: > Hi, > > how can I 'roll-back' some modifications done by some previous sql > statements with SQLite? > The ROLLBACK command will undo everything from within a transaction, assuming you have not already committed the transaction. Once a transaction commits, there is no built-in way to undo it. You'll have to invent an application-specific undo mechanism in that case. -- D. Richard Hipp <[EMAIL PROTECTED]> - To unsubscribe, send email to [EMAIL PROTECTED] -