system dsn with MS Access?

L

lucas

Hi,
I want to connect to an access database trough a system dsn. I used the
"Microsft Access Driver" to create the dsn (that's the driver I always
used in traditional ASP). I have the ODBC update installed. I'm not sure
what to put in my connection string. I put "Microsoft Access Driver" for
the driver but have never seen such a connection string.
This is my connection string:

strConnectionString = "DRIVER={Microsoft Access
Driver};SERVER=localhost;UID=sa;DATABASE=myAccessDB;";

I get this error message :
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified

Any ideas?
 
P

Paul Clement

¤ Hi,
¤ I want to connect to an access database trough a system dsn. I used the
¤ "Microsft Access Driver" to create the dsn (that's the driver I always
¤ used in traditional ASP). I have the ODBC update installed. I'm not sure
¤ what to put in my connection string. I put "Microsoft Access Driver" for
¤ the driver but have never seen such a connection string.
¤ This is my connection string:
¤
¤ strConnectionString = "DRIVER={Microsoft Access
¤ Driver};SERVER=localhost;UID=sa;DATABASE=myAccessDB;";
¤
¤ I get this error message :
¤ ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not
¤ found and no default driver specified

See if the following helps:

http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForAccess

Just keep in mind that you may encounter some limitations with the ODBC driver for Access. Typically
the Jet OLEDB driver is recommended.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top