General information
Category:
Database DAO/RDO/ODBC/ADO
Title:
Error in Deleting a Recordset row
I hit error message as follows(error message trap by using Err.Desc):
Error # -2147467257 Microsoft Cursor Engine
Insufficient or incorrect key column information;
too many rows affected by update.
This error happened only when I add 2 or more similar rows of
records into the Recordset and trying to Delete one of the rows
from the Recordset.
In other words, the error happened only when I Delete the row.
The following is my code to declar the Recordset settings:
Set rsTmp = New ADODB.Recordset
With rsTmp
.CursorLocation = adUseClient
.LockType = adLockPessimistic
.CursorType = adOpenKeyset
.ActiveConnection = cnn1
.Open "SELECT * FROM DataTable"
End With
Set DataGrid1.DataSource = rsTmp
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only