Subject | Re: AW: [Firebird-Java] Do I need to commit every transaction if I'm using jaybird? |
---|---|
Author | Mohd. Jeffry |
Post date | 2005-02-03T01:13:26Z |
> Statement stmt = con.createStatement();Is it safe to say that if the above compound statements execute fine I
> 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
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?