On my regular job, I have a task that would require accessing an MS Access database on IIS server.
Here's some simple list that I've do.
1. Make sure ODBC is supported on your install of php.
2. Make a data source name on Control Panel -> Administrative Tools -> Data Sources (ODBC) click the System DNS tab.
3. Point to the .mdb file location
4. Use php ODBC functions
Here are some equivalent functions if you have an existing code in php that uses mysql, you just rename some mysql functions to odbc.
mysql_connect / mysql_pconnect = odbc_connect / odbc_pconnect
mysql_query = odbc_execute
mysql_fetch_array = odbc_fetch_array
mysq_free_result = odbc_free_result
Be sure to check the php manual for proper arguments.



Leave a Reply