Jump to content

problem with connecting to access database using php


sandhya

Recommended Posts

hi all,

 

I have a big problem with access database connectivity using php. with dsn i'm able to connect. but not with out DSN. while using the following code ..

 

  $db = 'emailid.mdb';

 

$conn = new COM('ADODB.Connection') or exit('Cannot start ADO.');

 

$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db") or exit('Cannot open with Jet.');

 

 

i'm getting the following error.

 

Fatal error: Call to a member function Open() on a non-object in /home/sphoor21/public_html/san/accemail/data1.php on line 18

 

please help me I will be very thankful.

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.