Is there anything wrong with my code?? Im just trimming the entries because a lot has spaces after them. after i click my button there is a runtime error saying that the update has affected too many rows.
Thanks
Code:
Private Sub Command4_Click()
Dim x As String
Dim y As String
Dim MyConn As ADODB.Connection
Dim MyRecSet As ADODB.Recordset
Set MyConn = New ADODB.Connection
MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\thesis\FINAL\FilipinoDict.mdb;"
MyConn.Open
Set MyRecSet = New ADODB.Recordset
MyRecSet.CursorLocation = adUseClient
MyRecSet.Open "SELECT * FROM Dictionary", MyConn.ConnectionString, adOpenKeyset, adLockPessimistic
With MyRecSet
Do Until .EOF
x = .Fields(0)
y = .Fields(1)
.Fields(0).Value = RTrim(x)
.Fields(1).Value = RTrim(y)
.MoveNext
Loop
End With
End Sub
Comment