Help with DB::execute please?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi Folks,

    I don't seem to be able to get DB::execute to work using an ODBC  
datasource and a MS-Access Database.

    Can anyone tell me if I am doing something wrong, or is there a bug in  
the DB class?

    Code fragment is below.



require_once "DB.php";

 $dsn ="odbc(access)://tcp()driver=Microsoft Access Driver  
    $conn = DB::connect ($dsn);
    if (DB::isError ($conn))
       die ("Cannot connect: " . $conn->getMessage () . "\n");

    $updateQuery="UPDATE Book1 SET SubCategory = ? WHERE ID = ?;";
    $sth = $conn->prepare($updateQuery);
 if (PEAR::isError($sth))

 echo "<br> Prepare OK <br>";

 $data = array('1','1');
 $res1 =& $conn->execute($sth, $data);
 if (PEAR::isError($res1))

 echo "Update OK <br>";


Re: Help with DB::execute please?


Quoted text here. Click to load it

 But no error messages posted... what seems to be the problem?

< Space: disk usage analysis tool

Site Timeline