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");
0
edit delete
are you sure?
asked carlos col

0 answers

Post an answer but please log in first

Post Answer
  1. Please log in to post answer

Similar Questions

Tagsfor this question

Forumall questions