By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,027 Members | 1,271 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,027 IT Pros & Developers. It's quick & easy.

PHP and Access

P: 1
I have an Access database on a Windows machine, and I am running PHP on a Unix box. I want to connect to the access database from php.
I set up a Data Source on the windows machine pointing to the database. But I can figure out how I connect to it. Is there a way to put the host name into PHP's odbc_connect so PHP knows what machine to look at?
Sep 11 '07 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 10K+
P: 14,534
This is the standard connection string to Access databases

Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;
Sep 13 '07 #2

Expert Mod 10K+
P: 14,534
If you are using a DSN connection you can use the following:

Provider=MSDASQL; DSN=data_source_name; UID=username; PWD=password;
Sep 13 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.