|
-
Feb 13th, 2003, 12:31 AM
#1
Thread Starter
New Member
MS Access VB 6.0 DB connect using API
Iam using VB 6.0, MS Access as Data base.
I Want to connect Access using API from VB, with out using DSN.
How to do it. Hence i can install in any system, any directory with out creating dsn in that system.
I also dont want to give the path like ..
c:\somepath\mydb.mdb
since , If i install the program in D:/different Path.access.mdb,
It will say that .mdb does not exixt.
I want it using Windows API functions only.
Last edited by mmvraja; Feb 13th, 2003 at 05:34 AM.
-
Feb 13th, 2003, 12:39 AM
#2
You don't need a DSN to connect to a database.
VB Code:
Dim oConn As ADODB.Connection
Set oConn = New ADODB.Connection
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=c:\somepath\mydb.mdb;" & _
"Uid=admin;" & _
"Pwd="
-
Feb 14th, 2003, 04:07 PM
#3
Frenzied Member
DAO library is also very handy tool when working with MS Access (specifically when db is local).
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
|