ADO Connection Problems
| From: | Joe Mack | Date: | Tue, 16 Sep 2003 20:04:09 +0000 |
| Subject: | ADO Connection Problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-162779@lists.php.net to get a copy of this message | ||
I am having problems making things happen in a Microsoft Access Database
that I am connecting to through an ADO Connection using PHP. I know a
little bit about PHP and how to code, but this is the first time I have
played around with the ADO Connection and Command objects.
I am getting no error messages or anything, but when I browse the database,
my changes are not being posted. Here is an example of what I am trying to
do. Hopefully, I am just missing a step along the way.
$dbFile = '\\\\SERVER\\FOLDER\\BackEnd.mdb';
$conn = new COM('ADODB.Connection');
$conn->Open("DRIVER=Microsoft Access Driver (*.mdb);DBQ=$dbFile");
$cmd = new COM('ADODB.Command');
$cmd->ActiveConnection = $conn;
$cmd->CommandText = "UPDATE TABLE1 SET FIELD1 = '$parm1' WHERE FIELD2 =
'$parm2';";
$cmd->Prepared = TRUE;
$RSet = $cmd->Execute();
Any assistance anyone can offer would be greatly appreciated. Thank you.
Joe