Getting serial column value after Insert (ADO.NET)
Posted in 2004
Topics: Connectivity: ODBC / JDBC / .NET
Before I spend a great deal of time working with ADO.NET I want to make sure that I can get the value of a serial data field after an insert using ADO.NET. From a few test experiments it doesn't appear that there is anyway to know what value that serial data was after a new row was added to the DataSet and then updated from the DataAdapter. I am using the "Microsoft OLE DB Provider for ODBC Drivers" going against an Informix SE 7.25 database. I assume I can't use the "IBM Informix .NET provider" since that doesn't seem to be supported with Informix SE. Can anyone enlighten me a bit? Thanks. Tim
WOrst case the following query executed immediately after an insert will do it for you: select dbinfo('sqlca.sqlerrd1') from systables where tabid = 1; Check the DBINFO() function in the Guide to SQL Syntax manual. Art S. Kagel Nelson wrote: > Before I spend a great deal of time working with ADO.NET > I want to make sure that I can get the value of a serial > data field after an insert using ADO.NET. From a few test > experiments it doesn't appear that there is anyway to know > what value that serial data was after a new row was added > to the DataSet and then updated from the DataAdapter. > I am using the "Microsoft OLE DB Provider for ODBC Drivers" > going against an Informix SE 7.25 database. I assume I can't > use the "IBM Informix .NET provider" since that doesn't seem to be > supported with Informix SE. > Can anyone enlighten me a bit? > Thanks. Tim