In PHP I am connecting to an access database using ODBC. I update several fields no problem, but I am having a hell of a time getting two of them to work.
First one is of type date/time in access.
Second one is of type memo in access.
$mdbFilename = "pathTo.mdb";
$cimdb = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$mdbFilename", $user, $password);
$sqlInsert = "UPDATE MyTable ";
$sqlInsert .= "SET ";
$sqlInsert .= "Time='07:30:00 AM', ";
$sqlInsert .= "Note='My really long note here...' ";
$sqlInsert .= " WHERE ID=777";
$res = odbc_exec($cimdb, $sqlInsert);
The code produces.....
UPDATE MyTable SET Time='07:30:00 AM', Note='My really long note here...' WHERE ID=555
I have tried soo many things from casting to converting, to different types of spacing/formatting. I really hope someone has done this before.
What I really need to know is What format do I put the data in to get the access DB to accept the input?
Here is the error it throws...
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement., SQL state 37000 in SQLExecDirect in H:\web\count\countInject.php on line 116
SQL statement failed with error: 37000: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
Thank you MUCH for reading this through, and double thanks if you help me out =)