[SOLVED] ODBC MS Access probs. Can't INSERT INTO xxx VALUES
Posted: Wed Jul 28, 2004 11:19 pm
Hi,
I'm just trying to write a web page in php to process data in an existing Microsoft Access Database I've got.
I've set up ODBC and I can connect and SELECT rows etc but I get probs when I try to edit the DB in any way.
When I try "INSERT INTO websites (Owner) VALUES ('JoeBloggs')" like this...
I get this error
Please help....
Thanks
I'm just trying to write a web page in php to process data in an existing Microsoft Access Database I've got.
I've set up ODBC and I can connect and SELECT rows etc but I get probs when I try to edit the DB in any way.
When I try "INSERT INTO websites (Owner) VALUES ('JoeBloggs')" like this...
Code: Select all
<?php
$user = "xxxxx";
$pass = "xxxxxx";
$database = "clientsDB";
$connect_db = odbc_connect($database,$user,$pass) or die ('Wrong Command!!!');
$query = "INSERT INTO websites (Owner) VALUES ('owner')";
$result = odbc_do($connect_db,$query) or die ('dude something went wrong '.odbc_errormsg());
?>I've read up on this error and it just cobered the obvious read/write access issues. The dir is editable... i even tried moving it to wwwroot like it says on the Microsoft website with Read/write access but still got same prob.Warning: odbc_do(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect in d:\inetpub\wwwroot\add.php on line 13
dude[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
Please help....
Thanks