I have the chunk of code below. The exact same code with just a slightly different query to access a different database works fine in another script elsewhere on the site, but for some reason this page alone always throws the error:
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement., SQL state 37000 in SQLExecDirect in C:\Inetpub\wwwroot\fuel\test.php on line 29
INSERT INTO mreports (Year, Month, File, Order) VALUES ('2003', 'Jan', 'monthlyreports/test.pdf', '1')
Record not added, an error occurred : 37000
any ideas???? I'm stumped!
Thanks
PHP Code:
// connect to access database
$cfg_dsn = "DRIVER=Microsoft Access Driver (*.mdb);
DBQ=C:/Inetpub/wwwroot/monthly_fuel.mdb;
UserCommitSync=Yes;
Threads=3;
SafeTransactions=0;
PageTimeout=5;
MaxScanRows=8;
MaxBufferSize=2048;
php DriverId=281;
DefaultDir=C:/ProgramFiles/CommonFiles/ODBC/DataSources";
$cfg_dsn_login = "";
$cfg_dsn_mdp = "";
$connection = odbc_connect($cfg_dsn,$cfg_dsn_login,$cfg_dsn_mdp);
$command = "INSERT INTO mreports (Year, Month, File, Order) VALUES ('2003', 'Jan', 'monthlyreports/test.pdf', '1')";
if(odbc_exec($connection, $command)) {
