Subject Re: AW: [Firebird-Java] Do I need to commit every transaction if I'm using jaybird?
Author Mohd. Jeffry
> Statement stmt = con.createStatement();
> stmt.execute("INSERT INTO bla VALUES(1); INSERT INTO bla VALUES(2); UPDATE
> bla SET id = 2");
>
> If Firebird would accept such compund statements, both statements are
> executed atomically within the client-initiated transaction. Now let's
> assume that we have unique constraint defined for field ID. First two
> inserts succeed, last update will fail (table still contains records with
> ID=1 and ID=2). However, transaction is committed from the client.
>
> But currently Firebird does not support this (for example, DB2 does), so
> nothing to worry for now (but maybe there is some wierd example that I do
> not know).
>
> Roman

Is it safe to say that if the above compound statements execute fine I
don't need any extra commit. And if there is some error in the in the
compound statement I need to "commit" to make the correct part of the
sql statement to be in the database.... Is this sounds good?