Reading values back from a newly created record

  • Thread starter Thread starter Phil
  • Start date Start date
P

Phil

Hello,

This should be simple but I can't seem to find how to do it...

I have created a data form using the data wizard within VB.Net and now I
have added a new record.
What I want to do now is return the ID which is an AutoNumber (or
AutoIncrement in SQL)
How do I get the value of this newly created record?

Phil
 
There are a few ways but essentially you need to fire another query to get
that value. The data adapter configuration wiz has a choice on it - I
believe it says Refresh data set... but check out Managing an @@Identity
Crisis by Bill Vaughn at www.betav.com -> Articles -> MSDN.

Cheers,

Bill
 
Back
Top