Hi, there,
I have a problem with the ado data control's recordset delete method: when I
try to delete a record using the following code,
With datTest.Recordset
.Delete
.MoveNext
If .EOF Then
.MoveLast
End If
End With
I got the message: -2147217887 Errors occurred. But, when you just load the
form and do the delete, it usually works fine. Only after you move the
recordset few times, then you have the problem.
Where datTest is an ADO data control with the setting:
strConnection = "Provider=MSDAORA.1;Password=Test;User ID=Test;" & _
"Data Source=oracle;Persist Security Info=True"
strTable = "TEST"
strSQL = "SELECT * FROM " & strTable
With datTest
.LockType = adLockOptimistic
.CursorType = adOpenDynamic
.CursorLocation = adUseClient
.ConnectionString = strConnection
.RecordSource = strSQL
.Refresh
With .Recordset
If .RecordCount > 0 Then
.MoveLast
.MoveFirst
End If
End With
End With
in the form load event.
Can anybody help me?