Reading values back from a newly created record

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
 
W

W.G. Ryan MVP

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
 

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