Unix Technical Forum

Getting serial column value after Insert (ADO.NET)

This is a discussion on Getting serial column value after Insert (ADO.NET) within the Informix forums, part of the Database Server Software category; --> Before I spend a great deal of time working with ADO.NET I want to make sure that I can ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 08:16 PM
Nelson
 
Posts: n/a
Default Getting serial column value after Insert (ADO.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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 08:16 PM
Art S. Kagel
 
Posts: n/a
Default Re: Getting serial column value after Insert (ADO.NET)

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:42 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com