|
-
Aug 30th, 1999, 05:54 AM
#1
Thread Starter
Junior Member
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?
-
Aug 30th, 1999, 03:51 PM
#2
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]
-
Aug 30th, 1999, 06:45 PM
#3
I can use this...
Very nice
thankyou, Marc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|