basic insert statement using odbc
Posted: Wed Apr 30, 2003 9:51 am
I am using the following code to insert info into a table:
The echo is just to let me look at my sql statement.
I then get the error:
thanks all
Code: Select all
$strSQL="Insert into stationery (requested_by, item_needed, date_requested, type)"
. "('" . $txtRequestor . "','" . $txtItem . "','" . $txtDate . "','" . $txtType . "')";
$execute= odbc_exec( $dbConnection, $strSQL);
echo $strSQL;
odbc_close($dbConnection);I then get the error:
I have had a look for the error and it says that it is a syntax error but I dont see anything wrong with the syntax unless it is something I am not aware ofWarning: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '1'., SQL state 37000 in SQLExecDirect in C:\Program Files\Apache Group\Apache2\htdocs\php\bees\consumables\pagemaster.php on line 126
thanks all