views:

33

answers:

1

Using c#, vs2008.

Howdy,

I have a slq server table that has a primary key column that is auto incrementing when new record is added.

I am loading a dataset with sqlAdaptor.select sql statement, created with query editor and auto generate update and insert using the wizard.

I need advice. When i have loaded dataset with select statement reflecting existing table data, what do i do when i add a new row of data to the dataset. The dataset wont know about the auto incrementing primary key of the table, so can i just call the auto generated update command and the dataset sorts itself out and gets the correct primary key from the table or what ?

How is one supposed to deal with this situation

thanks for any advice

A: 

Retrieving Identity or Autonumber Values (ADO.NET)

Check Merging New Identity Values section.

Aseem Gautam