G
Guest
Hello,
I got the error "Concurrency violation: the UpdateCommand affected 0
records" while updating some records in the Windows Application. I am using
VB.net in VS 2003 and the backend is Access (2000) database.
My Code is just like as the following,
Public Function UpdateRecord (UpdatedDataSet as DataSet, myConnstr as
string, mySelectSql as string)
Dim myConn as New oleDbConnection(myConnstr)
Dim myDataAdpter as New OleDbDataAdpter
MyDataAdpter.selectCommand=New OleDbCommand(mySelectSql, myConn)
Dim updateCB as OleDbCommandBuilder =New OleDbCommandBuilde(myDataAdpter)
myConn.Open()
myDataAdpter.Update(UpdatedDataSet) ' Here is the error comes up
myConn.Close()
….
End Function
There are 80% records updated without this problem, only some of them have
this error. Please help.
Thanks in advance.
Miriam
I got the error "Concurrency violation: the UpdateCommand affected 0
records" while updating some records in the Windows Application. I am using
VB.net in VS 2003 and the backend is Access (2000) database.
My Code is just like as the following,
Public Function UpdateRecord (UpdatedDataSet as DataSet, myConnstr as
string, mySelectSql as string)
Dim myConn as New oleDbConnection(myConnstr)
Dim myDataAdpter as New OleDbDataAdpter
MyDataAdpter.selectCommand=New OleDbCommand(mySelectSql, myConn)
Dim updateCB as OleDbCommandBuilder =New OleDbCommandBuilde(myDataAdpter)
myConn.Open()
myDataAdpter.Update(UpdatedDataSet) ' Here is the error comes up
myConn.Close()
….
End Function
There are 80% records updated without this problem, only some of them have
this error. Please help.
Thanks in advance.
Miriam