Re: SELECTing the last value inserted into a SERIAL column
Posted in 1997
In article <33A66A88.4B4E@west.co.za>, marks@west.co.za says...
>> I have a somewhat similar question. Does anybody know a way of
>> accessing SQLCA using ODBC?
>> I am using Informix-CLI APIs. I couldn't find any ODBC functions that
>> give access to SQLCA.
>
>If there is no function, and you have a version 7 database engine,
>you can PREPARE and DECLARE a CURSOR to return the value of dbinfo()
>with the parameters "sqlca.sqlerrd1" or "sqlca.sqlerrd2".
You don't need a cursor; you can even use dbinfo() with dbaccess, if you
needed to. One caveat, though; it's only guaranteed to be useful with using
the ODBC API directly. Visual Basic, for instance, does some creative things
with any SQL you pass through the Jet engine or its data controls. :-(
--
William Harris william@carsinfo.com