Get index of newly inserted data adapter data set
Posted on 2004-03-25
I've added a new record into my sql table by adding a new row into a data set then updating using a data adapter.
However when i refill my dataset the newly inserted record is not in it :(
The new record has been made by the way, I need the index of the newly inserted record to maintain referential integrity
as I am updating another table straight after which needs the index of the newly inserted record.
I know (as I have before) that you can just grab the max index from the table and hope no new records have been
added between the insert and select max index queries.
Is their a better way of doing this?
Hope you can help as this is my first .net project,