Brinkster Knowledge Base
How do I connect to a MS Access database with PHP
Important information regarding the following code samples.
All references to "UserName" need to be replaced with your actual Brinkster UserName.
All references to "Password" need to be replaced with your actual Brinkster Password.
Microsoft Access Database
Important information regarding the Access Database code sample.
The following path reference is not specific: c:\\sites\\server. Please log into your account, select the web site settings, and use the absolute path to your file structure.
Access Driver $conn = new COM('ADODB.Connection'); $db = 'c:\\sites\\server\\UserName\\database\\database.mdb'; $conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db"); $conn->close |
Jet Driver
$conn = new COM('ADODB.Connection'); $db = 'c:\\sites\\server\\UserName\\database\\database.mdb'; $conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db"); $conn->close |