Typed DataTable - NewRow() - Identity Field

  • Thread starter Thread starter TheMaxx
  • Start date Start date
T

TheMaxx

ADO 2.0

When i do:
MyRow = MyDataTable.NewMyRow();
MyRow.IdentityField value equals last ID + 1

What if other user is doing the same thing and gets same ID

On DatatTableAdapter.Update both users will try to update with same ID.
I also did not expect IdentityField to have a value (or have it = 0) because
that value should be prvided by SQL Server, not by DataTable in memory !?
 
If you ID is a primary key or unique key field then you will have no issue
because there is no way to have the same value.

chanmm
 

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

Back
Top