Writing a value to local DB

时间:2015-06-25 18:21:51

标签: c# database datatable

I have a database and dataset to interact with it,

SampleDatabaseDataSet database = new SampleDatabaseDataSet();
SampleDatabaseDataSet.Table1Row table1 = database.Table1.NewTable1Row();
table1.call_id = 55;
database.Table1.Rows.Add(table1);

The error I'm getting is in table1.call_id

'table1.call_id' threw an exception of type 'System.InvalidCastException' int {System.InvalidCastException}

0 个答案:

没有答案