PHP with ODBC Connection (MS Access)

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
desmondlk
Forum Commoner
Posts: 27
Joined: Tue Sep 24, 2002 10:27 pm
Location: Malaysia

PHP with ODBC Connection (MS Access)

Post by desmondlk »

Hi All,

Currently, I am exploring the ODBC connection (MS Access) with PHP. I executed the below PHP script.

$Username = "admin";
$SessionID = "Ux99ulB5p8PnMJWl3ZBs";

$Query1 = "INSERT INTO login ".
"(Username, SessionID) ".
"VALUES ('$Username', '$SessionID')";

$result1 = odbc_do($cn, $Query1);

However, it thrown out the below error message.

Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect.

May I know whether my script is incorrect? Please help.

Thanks in advance.

Regards,
Desmond.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

I don't use MS Access myself but i believe this is related to permissions. Make sure the 'admin' user has write permissions on 'login'
Post Reply