Hey,
I am having trouble with a DataGrid. I am using VB .Net 2003 and Access 2003, when I try and update the access table with information from the DataGrid it seems to work fine however when I try and modify a row that has already been entered I recieve the following error:
"System.Data.DBConcurrencyException: Concurrency Violation: The UpdateComman affected 0 records.
at System.Data.Common.DbDataAdapter.Update(DateRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet)
at Self_Monitoring.Exercise.btnSubmit_Click(Object sender, EventArgs e) in "file name":line 229"
the line of code it's reffering to is:
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Try
OleDbDataAdapter1.Update(DsExercise1)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
There is also another problem where the DateGrid won't update the time on a DateTime field within the table in Access, could this be linked?
Any help would be gratefully recieved!!
I am having trouble with a DataGrid. I am using VB .Net 2003 and Access 2003, when I try and update the access table with information from the DataGrid it seems to work fine however when I try and modify a row that has already been entered I recieve the following error:
"System.Data.DBConcurrencyException: Concurrency Violation: The UpdateComman affected 0 records.
at System.Data.Common.DbDataAdapter.Update(DateRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet)
at Self_Monitoring.Exercise.btnSubmit_Click(Object sender, EventArgs e) in "file name":line 229"
the line of code it's reffering to is:
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Try
OleDbDataAdapter1.Update(DsExercise1)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
There is also another problem where the DateGrid won't update the time on a DateTime field within the table in Access, could this be linked?
Any help would be gratefully recieved!!