aberry
MIS
- Jun 6, 2002
- 24
Hi,
I have 1 table in a MySQL database which I am trying to update all the records in programatically. If I update the records manually there are no problems.
The code updates 39 records and then bombs with the following error message:-
Key column information is insufficient or incorrect.Too many rows were affected by update.
Any ideas how to get around this?
Cheers,
Andrew
Snippets of code as follows:-
rsPadTrans.ActiveConnection = db
rsPadTrans.CursorLocation = adUseClient
rsPadTrans.LockType = adLockOptimistic
Do Until rsPadTrans.EOF = True
With rsPadTrans
.Fields("Invoiced"
= "Y"
.Fields("InvDate"
= Left(sDate, 2) & "/" & Mid(sDate, 3, 2) & "/" & Right(sDate, 2)
.Update
.Requery
End With
StatusBar1.Panels(1).Text = "There are " & rsPadTrans.RecordCount & " records to be processed. Export records"
rsPadTrans.MoveNext
iLoop = iLoop + 1
Loop
I have 1 table in a MySQL database which I am trying to update all the records in programatically. If I update the records manually there are no problems.
The code updates 39 records and then bombs with the following error message:-
Key column information is insufficient or incorrect.Too many rows were affected by update.
Any ideas how to get around this?
Cheers,
Andrew
Snippets of code as follows:-
rsPadTrans.ActiveConnection = db
rsPadTrans.CursorLocation = adUseClient
rsPadTrans.LockType = adLockOptimistic
Do Until rsPadTrans.EOF = True
With rsPadTrans
.Fields("Invoiced"
.Fields("InvDate"
.Update
.Requery
End With
StatusBar1.Panels(1).Text = "There are " & rsPadTrans.RecordCount & " records to be processed. Export records"
rsPadTrans.MoveNext
iLoop = iLoop + 1
Loop