-
I don't think I'm stupid, but I can't seem to get anything to work with ADO yet. Plus, I don't know what or who to believe when it comes to documentation. Can somebody just tell me how to open a simple recordset on a simple Access table in the same folder as the app?
-
Try this:
Code:
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strSQL As String
cn.Provider = "Microsoft.Jet.OLEDB.3.51"
cn.Open "D:\Microsoft Visual Studio\VB98\Nwind.mdb", "admin", ""
strSQL = "Select * From Customers"
rs.Open strSQL, cn, adOpenStatic
If rs.EOF And rs.BOF Then Exit Sub
Do Until rs.EOF
List1.AddItem rs(1)
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
-
I can use this...
Very nice
thankyou, Marc