Hello everyone,

This mangesh Sathe ,India.

I have one problem in db connectivity
how to connect to an Access database *.mdb with a DSN and without a DSN.

I trying to do it on php 5.1 but on other sites it's maintioned that it
work's only on 4.x .

sample code is,

$db = 'C:\\Program Files\\Northwind.mdb';

$conn = new COM('ADODB.Connection') or exit('Cannot start ADO.');
// Two ways to connect. Choose one.
$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db") or
exit('Cannot open with Jet.');
//$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db") or
exit('Cannot open with driver.');

Waiting yours Reply

Thanku very much

-- 
Thanks & Regards,
Mangesh Sathe
_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/show_participation.php

Reply via email to