Hi!,
Just asking how to edit records using ADO, im really not much of an ADO user. This is my first time practicing ADO i know how to add records but not Edit and Delete. Im using ADO ODBC!!!
Any help!!! Pls.....
Actually im using ADO ODBC but im not good in ADO. Can u give the equivalent code of this in ADO...
Set rs = db.OpenRecordset("MyTable", dbOpenDynaset)
With rs
.FindFirst "Field1='" & Text1 & "'"
If Not .NoMatch then
my code goes here .....
Else
No Data found in the Database
End if
End With
rs.Close
set rs = Nothing
I just want to know whats the equivalent of "NoMatch" in ADO? im using ADO ODBC... and i think there's no rs.Edit in ADO just an EditMode. I can now add but no edit yet...
set rs = New adodb.recordset
rs.open "MyTable", currentproject.connection, adOpenDynamic
with rs
'to test if there are any records
If Not .BOF then
'the following 2 lines are equivalend of the "FindFirst"
.MoveFirst
.Find "Field1='" & Text1 & "'"
'if the record doesn't exist, the pointer is at the end of the recordset
If Not .EOF then
my code goes here .....
Else
No Data found in the Database
End if
End If
End With
rs.Close
set rs = Nothing
Note that you have to insert the "Microsoft Active X Data Objects X.X Library"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.