|
-
Aug 10th, 1999, 03:35 AM
#4
New Member
Okay. Instead of using DRIVER use PROVIDER as in : "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\Biblio.mdb;Persist Security Info=False" for the connect string.
Everything else is the same.
Dim cn as ADODB.connection
Dim rs as ADODB.Recordset
set cn = New connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\Biblio.mdb;Persist Security Info=False"
rs.open "SELECT * FROM Authors", cn
to reference the fields, I use rs.fields.item(index)
I haven't used Jet at all. I would bet that it works better than MySQL. You might have to set the cursor to be able to move backwards. You might even be able to reference the fields by name. I have always just used the index though.
To fill a listbox with author names (say authors is the 3rd field)
do while not rs.eof
list1.additem rs.fields.item(2) 'the fields start with 0
rs.movenext
loop
hope that helps
[This message has been edited by thorne (edited 08-10-1999).]
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
|