Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i am using: Visual C# 2008, SQL Express 2005

this is the code :

C#
DataTable dt;
ProjectDS dsPro;
ProjectDSTableAdapters.tblCfgTableAdapter taCfg;
object[] ao

dt = dsPro.Tables["tblCfg"];

dt.BeginLoadData();
dt.LoadDataRow(ao,false); (ao : object[])
dt.EndLoadData();
taCfg.Update(dsPro.tblCfg);


there's no runtime error

dt has autoincrement-column, so ao contains 'null' for that column

after LoadDataRow : debug shows dt containes the new data autoincrement value however is -1

after taCfg.Update : in database-explorer the db-table DOES NOT contain that data

something missing in the code ?

thanks in advance
Posted
Updated 9-Jul-14 0:21am
v2
Comments
George Jonsson 9-Jul-14 6:22am    
I tried to format your code, but it is not complete.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900