Getting PK of last inserted record via dataset

  • Thread starter Thread starter Daren Hawes
  • Start date Start date
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
 
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
 
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
 
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
 
Back
Top