Re: ADO Connection Problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Why are you using COM - haveyou looked at PEAR DB - this is class that makes conencting ot various DB's easy in php
http://pear.php.net/manual/en/package.database.php



Joe Mack wrote:


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

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux