Inserting using Formview

G

gadya

I use the Msoft example in "working with data in asp.net 2.0- creating a
business logic layer" as below to insert a record which I have entered in a
formview. I would like to follow this by displaying the inserted record
rather than returning to an arbitrary record in Edit mode - but I don't have
ithe new productID, only the number of rows affected.

products.addProductsRow(product)
dim rowsAffected as integer = adapter.update(products)
return rowsAffected = 1

Could anyone suggest how I might obtain the new productID while still using
the procedure above?
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top