Getting PK of last inserted record via dataset

D

Daren Hawes

Hi guys,

I am doing the following and need the PK ID of the record I just
inserted..

Thx in advance..

I am

1. Filling a dataset
2. Inserting a row
3. -- Need the just inserted PK --
4. Making a online payment with the PK as a reference
5. If all is well (Payment side) Updating record to SQL Server
6. Else do not update to the SQL server
 
B

Brian P. Hammer

ASAIK, there is no short answer but search the help collection for
Retrieving Identity or Autonumber Values
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconretrievingidentityorautonumbervalues.htm
 
G

Guest

Hi,
You can very well write a Stored procedure which first inserts a record in the DB and then returns the scope indenty........
Regds
Bindukaladeepan.C
 
G

Guest

Hi,
You can very well write a Stored procedure which first inserts a record in the DB and then returns the scope indenty........
Regds
Bindukaladeepan.C
 

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

Top