Unanswered: ms access ADODB connection, sql update error
I am connecting to a microsoft access 2000 database using the following PHP code:
$dbconn = new COM("ADODB.Connection") or die("Cannot start ADODB Connection from 'database_conn.php'");
$dbconn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" . realpath("database/ubmc_db.mdb"));
fairly bog standard. I am able to retieve rows using the $dbconn->Execute function.
I get problems when I try and run update statements:
$sqlquery = "UPDATE Members SET password = 'newpassword' WHERE members.mid = 1";
I never use adodb or com (or Jet) in my php precisely because it can be very confusing when things break.
What I would do is set up a system DSN for that access database and access in it php via the odbc drivers. I know, it's a lot of work to re-write ... maybe not the best solution, but it's my advice.
Alternatively, run that sql from access. (set up a new query, and then go to sql-view, and you can type direct sql like this.) It's been quite a while since I used Jet directly, so there may be some funky things you have to do like use double-quotes or 's around the table names. Running the code in Access will give you an idea if there's something it dislikes (although Access SQL !== Jet SQL).
I always use odbc for this stuff, because it makes the code MUCH more portable. If you ever decide to switch to mssql or postgres or mysql (or even change the underlying OS to linux, for example), you simply have to change the odbc connection string and all your code instantly works on said DB / OS.
Sorry it's not the answer you were looking for, but depending on the size of your project, it may be worth it to you. (And definitely something to think about in the future. MS Access as a multi-user, web-enabled database server is never a good long-term plan.)