I'm trying to do a simple update to an access database using the ADOdb library. For some reason I can't get it to work. I can however, get a simple select statment to work just fine. Take a look at my code below as well as the error message. Maybe someone can help me out. As you'll see below there isn't an error generated from the select statement, but I do get one from the Update statment. The error says there are too few parameters, but I'm not sure what else I need. *disclaimer* - my SQL skills are not real strong....

Any help is much appreciated!

**** CODE *****

<?php
require_once('adodb.inc.php');
require_once('connect-info/cms_db.inc.php');

$sql = "SELECT * FROM tblFAQ_Book WHERE autoBookID = 1";

$rs = $db_conn->Execute($sql);

$updateSQL = "UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = \"one more test\" WHERE (tblFAQ_Book.autoBookID = 1)";

$db_conn->Execute($updateSQL);
$db_conn->Close();

**** ERROR MESSAGE ****

(access): SELECT * FROM tblFAQ_Book WHERE autoBookID = 1

(access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test" WHERE (tblFAQ_Book.autoBookID = 1)

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to