Getting Identity of Inserted Record in FormView

B

bigbrorpi

Hi -

I am working on code to log each transaction made through a FormView. I
need to pass it the unique ID (row number) of the record that was just
Inserted/Updated/Deleted.
Updates and Deletes are easy, but I'm having problems with the Insert.

I have this working with another FormView where I manually call the
Insert function on an instance of a table adapter and capture the
return value to get the SCOPE_IDENTITY returned by the query. In this
case though, I'm trying to use a sub to handle OnItemInserted and do
the logging from there. I can't figure out how to get the return value
of the Insert query that was called by the ObjectDataSource. Any ideas
as to how to do this?

Thanks!
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top