AddNew()

  • Thread starter Thread starter Bernhard Wurm
  • Start date Start date
B

Bernhard Wurm

Hello!

How can I get the ID of a new row in my MSDE?
When I programmed ASP classic, I used the AddNew() - Method of the
RecordSet. How can I do this in ADO.NET?

I won't use @@Identity, because it isn't guaranteed, that this is the ID of
my row.

If I use a DataAdapter and a DataSet I've to fill the DataSet with the whole
data of the table?! That's not good!

so how can I do this?

thx
Bernhard Wurm
 
Hi Bernhard,

Bernhard Wurm said:
Hello!

How can I get the ID of a new row in my MSDE?
When I programmed ASP classic, I used the AddNew() - Method of the
RecordSet. How can I do this in ADO.NET?

I won't use @@Identity, because it isn't guaranteed, that this is the ID
of my row.

Instead of @@identity use scope_identity().
 
Back
Top