S
sek
Hi Folks,
I am using Access and OleDb in ADO.NET in my application. Basically, my
app allows users to view the db and add new rows to it using DataGrid
control.
My unique field in the table is a AutoNumber field.
When i try to add a new row through the datagrid and then invoke
DataAdapter.Update method, following exception is thrown.
"Index (zero based) must be greater than or equal to zero and less than
the size of the argument list."
Following is the stack trace:
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String
srcTable)
at MyProj.ClassDb.UpdateTable(DataSet dsRecords) in e:\code\c#\....
Moreover, I am using the RowUpdated event handler to get the AutoNumber
value generated for the new row. In the event handler, i am getting the
RowUpdatedEventArgs.Status = "ErrorsOccured".
Any pointers would be of great help.
TIA.
Sek
I am using Access and OleDb in ADO.NET in my application. Basically, my
app allows users to view the db and add new rows to it using DataGrid
control.
My unique field in the table is a AutoNumber field.
When i try to add a new row through the datagrid and then invoke
DataAdapter.Update method, following exception is thrown.
"Index (zero based) must be greater than or equal to zero and less than
the size of the argument list."
Following is the stack trace:
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String
srcTable)
at MyProj.ClassDb.UpdateTable(DataSet dsRecords) in e:\code\c#\....
Moreover, I am using the RowUpdated event handler to get the AutoNumber
value generated for the new row. In the event handler, i am getting the
RowUpdatedEventArgs.Status = "ErrorsOccured".
Any pointers would be of great help.
TIA.
Sek