-
OK, I finally understand (I sincerely hope) how to connect to a database with ADO. Now I'd like to be able to do something like use a simple Find function. You'd think there would be some examples in Help, but instead it seems like every help topic in VB6 is about how wonderful everything Microsoft does and how much more wonderful everything is going to be in the future, and how simple it all really is. How do you do a simple Find?
------------------
-
You can try something like this:
Code:
Dim rs As New ADODB.Recordset
Dim cn As New ADODB.Connection
cn.Provider = "Microsoft.Jet.OLEDB.3.51"
cn.Open "D:\Microsoft Visual Studio\VB98\Nwind.mdb", "admin", ""
rs.Open "Select * from Customers", cn, adOpenStatic
rs.Find "CompanyName like 'Blauer*'"
If rs.EOF Then
MsgBox "Record not found."
Else
MsgBox "You found your record."
End If
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]