ODBC connection string for MS-Access

S

Shashank Date

I have tried the following strings for connecting to MS-Access using
Ruby/ODBC and Ruby/dbi. None of them work.

Attempt# 1>

cnstr = "Provider=Microsoft.Jet.OLEDB.4.0;"
"DATA SOURCE=C:\\mytest.mdb;" +
"USER ID=admin;PASSWORD=;"

Attempt# 2>

connect_str = "Driver={Microsoft Access Driver (*.mdb)};" +
"Dbq=C:\\mytest.mdb;" + "Uid=admin;" + "Pwd="

Attempt# 3> This one worked with Win32OLE but not with ODBC :-(

$db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=\"C:\\mytest.mdb\""

Any suggestions?
TIA,
-- shanko
 
S

Shashank Date

Shashank Date said:
I have tried the following strings for connecting to MS-Access using
Ruby/ODBC and Ruby/dbi. None of them work.

Forgot to mention that I am on Win XP(Home) using the latest
ruby-1.8.1 (one-click installer) and MS_Access 2002 (SP-1).

-- shanko
 

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top