Retrieving DB2 Identity back to Dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a database table ("Users") in a IBM DB2 database. The table primary key is auto incremented. The PK column is called UserID.

When I do an update of my Users dataset back to the database, how do I get the newly generated primary key(s) back to the UserId column of my dataset?

Any help is appreciated.

Thanks
Vince
 
Hi Vince,

You will have to add sql statament that returns at least new id after the
insert statament.
Maybe this thread might help:
http://groups.google.com/groups?hl=...ement&safe=images&ie=UTF-8&oe=UTF-8&lr=&hl=en

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
www.rhand.com

Vince said:
Hi,

I have a database table ("Users") in a IBM DB2 database. The table primary
key is auto incremented. The PK column is called UserID.
When I do an update of my Users dataset back to the database, how do I get
the newly generated primary key(s) back to the UserId column of my dataset?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top