PHP Connection Problem with ODBC After Moving out from Local Machine
In the following, Section 1 was my original code. The php code connected with an Access file was running Apache server in my local machine, and they did work fine.
However, after moving the php and Access file to a web server, and changed $db='W:\\EmpRosterDev\\UserDB.mdb'; in the php, it gets an error message. Please see Section 2.
Section 1:
-----------
<?php
$db='C:\\Documents and Settings\\My Documents\\IT\\UserList\\EmployeeList\\User_Demo1. mdb';
$conn = new COM('ADODB.Connection');
// Connection
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db");
$sql = 'SELECT... ';
$rs = $conn->Execute($sql);
...
Section 2
-----------
Warning: Invoke() failed: Exception occurred. Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x768 Thread 0x6b4 DBC 0xaac5fc Jet'. In C:\htdocs\dt_util\EmpRosterDev\DevEmpRoster.php on line 44
Could someone tell me how to fix this problem?
Thanks in advance,
Shan