Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21843

Row cannot be located for updating , ?? please help ,

$
0
0
Hi All

I make this connection between MySQL database and my VB6 application

in database this column ,

ID----Name-----USERID----

some time i need to change all userID number column , this code i write

Code:

Dim fI  As Long
'On Error GoTo t:

Adodc2.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=test"
Adodc2.RecordSource = "select *from newdata"
Adodc2.Refresh
Adodc2.Recordset.MoveFirst
For fI = 0 To Adodc2.Recordset.RecordCount
Adodc2.Recordset.Fields(2) = "20349582"
Adodc2.Recordset.Update    /// here is the error
End If
Adodc2.Recordset.MoveNext
Next

this return me error message "Row cannot be located for updating ... "
i can add new data using

Code:

adodc2.recordset.addnew"
it work geat

but why i phase this issue , any hint please


regards

Viewing all articles
Browse latest Browse all 21843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>