crusty76 Posted January 24, 2008 Share Posted January 24, 2008 Hi, I've managed to read a record and insert a record but doing a record UPDATE is beyond me. I've tried. $query1 = "UPDATE data SET Header = $Header WHERE ID1= $id"; $cr1=odbc_exec($connect,$query1); but get an error message. PLEASE help an aged old Crusty. Where have I gone wrong please. Crusty Quote Link to comment https://forums.phpfreaks.com/topic/87540-update-ms-access-database-using-php/ Share on other sites More sharing options...
trq Posted January 24, 2008 Share Posted January 24, 2008 Your query doess not look valid. $query1 = "UPDATE data SET Header = '$Header' WHERE ID1= '$id'"; Quote Link to comment https://forums.phpfreaks.com/topic/87540-update-ms-access-database-using-php/#findComment-447744 Share on other sites More sharing options...
crusty76 Posted January 24, 2008 Author Share Posted January 24, 2008 Thanks for the suggestion. Tried that but it doesn't work. Message is:- Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression., SQL state 22005 in SQLExecDirect It's all a bit frustrating. I've been at it now for a week :-) crusty Quote Link to comment https://forums.phpfreaks.com/topic/87540-update-ms-access-database-using-php/#findComment-447761 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.