DBINFO('sqlca.sqlerrd1') returns 0
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET
Hi folks
We are using Informix 2000 accessed over JDBC using Informix's type 4 JDBC
driver (as opposed to a JDBC-ODBC bridge).
INSERT's to tables with a SERIAL field are wrapped by functions that
immediately call DBINFO('sqlca.sqlerrd1') to ascertain the serial id of the
record just inserted.
Very occassionally we get 0 returned by this, even though the insert
succeeded, the table had a SERIAL field and the DBINFO('sqlca.sqlerrd1')
call was the very next command issued on that connection.
Any ideas why we may be seeing this ?
I thought it may be concurrency issues but have run tests to prove that
DBINFO('sqlca.sqlerrd1') is, indeed, a per connection based attribute.
Thanks
Gary
Sounds like a JDBC bug. Report it to Informix. Does JDBC provide a
direct interface to the sqlca data structure? You can also get the
serial number from there if so?
Art S. Kagel
Gary Smith wrote:
>
> Hi folks
>
> We are using Informix 2000 accessed over JDBC using Informix's type 4 JDBC
> driver (as opposed to a JDBC-ODBC bridge).
>
> INSERT's to tables with a SERIAL field are wrapped by functions that
> immediately call DBINFO('sqlca.sqlerrd1') to ascertain the serial id of the
> record just inserted.
>
> Very occassionally we get 0 returned by this, even though the insert
> succeeded, the table had a SERIAL field and the DBINFO('sqlca.sqlerrd1')
> call was the very next command issued on that connection.
>
> Any ideas why we may be seeing this ?
>
> I thought it may be concurrency issues but have run tests to prove that
> DBINFO('sqlca.sqlerrd1') is, indeed, a per connection based attribute.>
> Thanks
>
> Gary