|
-
Oct 26th, 1999, 08:45 PM
#1
Thread Starter
New Member
I am trying to access a database(mydatabase.mdb) using Visual Basic 5.0(6.0). How can I access the data WITHOUT using a data control?
Thanks in advance
-
Oct 26th, 1999, 10:36 PM
#2
Guru
add a reference to ms active x data object objects 2.x
dim rs as recordset
dim cn as new connection
cn.connectionstring = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:\my\path\to\database.mdb"
cn.open
set rs = cn.execute("select * from mytable")
msgbox rs.fields("fieldname").value
All done
HTH
Tom
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
|