Subject Re: Strange problem: inserts failing
Author Roman Rokytskyy
Hi,

> I am facing a strange problem using JBird. I have a program that
> launch a couple of threads wich, among other things, make some
> inserts in the database using JBird. After all the threads have
> executed, some of the inserts were really done, but other not (this
> can be seen looking at the database). The strange thing is that the
> call to the method executeUpdate of the java.sql.Statement is in
> fact executed, however there is no changes in the database. BTW, the
> method that calls executeUpdate is synchronized.

Do you synchronize on Connection object? What about transaction control?

> Also, no exceptions were risen. Another strange thing is that
> copying the SQL statement and executing it in a IBConsole, for
> example, correctly inserts the records in the database.
>
> Do you know any situation that could make a calling of the
> executeUpdate method make no effect in the database and, at the same
> time, rise no exception?

Check the output of executeUpdate() method (it returns you information
about affected rows, in your case it should be 1). If it is correct,
check the transaction management, maybe you rolled the transaction back.

Best regards,
Roman