1
Answer

Updating Identity Column / DataAdapter

jdrocks57

jdrocks57

20y
1.9k
1
I'm trying to update a table that has an Identity column. Which as defined in the table can't be null. Prior to issuing the data Adapter's update command, I get all the data set up, and obviously I don't set any value for the Identity column, cause the database will do that. But when I fire off the Update command, I get the SQL Exception error stating the Identity column can't be null. I've tried setting the column for the table with DataColumn dc = ds.Tables[0].Columns["id"]; dc.AutoIncrement = true; dc.AutoIncrementStep = 1; But that did nothing.
Answers (1)