This may not be the solution for you but I use the "on conflict" (http://www.sqlite.org/lang_conflict.html) algorithms when creating tables to automatically rollback when trying to insert duplicate contents.
Nick -----Original Message----- From: John Buck [mailto:[EMAIL PROTECTED] Sent: 12 May 2005 17:12 To: sqlite-users@sqlite.org Subject: RE: [sqlite] Does sqlite really support transaction? *** WARNING *** This mail has originated outside your organization, either from an external partner or the Global Internet. Keep this in mind if you answer this message. I can think of no way to implement complex atomic transactions with rollbacks in a flat SQL script. You need some sort of higher level language to make decisions about results .. IE C++ etc.. -- JB -----Original Message----- From: Vladimir Zelinski [mailto:[EMAIL PROTECTED] Sent: Thursday, May 12, 2005 11:26 AM To: sqlite-users@sqlite.org; Jay Sprenkle Subject: Re: [sqlite] Does sqlite really support transaction? Here is the problem. My external program builds sql script and places into file my_script.sql Then I execute statement "sqlite3 my_db < my_script.sql" as a system call from my external program. I can check result of execution this statement and it always returns 0 (success) regardless of actual SQL result. I have absolutely no knowledge of my SQL execution status. Vladimir --- Jay Sprenkle <[EMAIL PROTECTED]> wrote: > On 5/12/05, Vladimir Zelinski <[EMAIL PROTECTED]> > wrote: > > I understand that. Question is HOW I can check if > > statement failed or successful? What variable > contains > > status of the result of execution. > > The return code from the call that executes it. > Are you running SQL via code or from the command > line interpreter? > ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ********************************************************************