connections not work in php
I am trying to connect an access 97 database from php, I have tried three ways methods and none works for me:
$db = 'c:/VENTAS.MDB';
$odbcname = "ventas_dsn_sistema";
$conn = new COM('ADODB.Connection');
// three ways to connect. Choose one.
//$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db");
//$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; charset=UTF-8; DBQ=$db; Uid=''; Pwd='';");
$conn->Open("DSN=$odbcname");