I'm very familiar with transactions in Oracle &
Sybase. The provide with mechanism to figure out state
if SQL execution and COMMIT or ROLLBACK.

I did not find any way to do that in SQLITE, but it
has specific syntax like this bellow:

BEGIN TRANSACTION ON CONFLICT ROLLBACK;
   <sql stuff here>
END TRANSACTION;

which should take care about this problem. I thought
this way before I got into problems.

So basically, SQLITE doesn't provide with mechanism
that would allow me to do in a way I tried to execute
SQL batch. 

Here I found error codes:
http://sourceforge.net/mailarchive/forum.php?thread_id=3743365&forum_id=7331

If I'm able to get these codes from command line
interpreter I would be all set. Is it possible to get
these values? That is basically my question. 

Something like this would be ideal: 

> insert into t(id) values(10);
> select @@error_code;
> 19  -- stands for unique key violation

Thank you,
Vladimir

--- John Buck <[EMAIL PROTECTED]> wrote:
> MySql works like you described..  Frankly im
> surprised Postgres doesn't .
> Id imagine there must be a "continue trnasaction"
> command or something.
> 
> --
> JB
> 
> -----Original Message-----
> From: Thomas Briggs [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 12, 2005 12:25 PM
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] Does sqlite really support
> transaction?
> 
>  
> > >   This isn't an SQLite thing either... All
> databases work 
> > this way, as
> > >far as I'm aware.
> > >  
> > >
> > Postgres refuses to process any further sql
> statements in a 
> > transaction 
> > after an error occurs with
> > one of the sql statements.
> 
>    Heh.  I should have said that "all databases with
> which I am familiar
> work this way".  Postgres is obviously not one of
> the databases with
> which I'm familiar. :)  I did try MS SQL Server,
> Oracle and DB2 and they
> all function this way.  Didn't try MySQL though...
> Hrm.
> 
>    -Tom
> 
> 
> 

Reply via email to