I'm trying to access an Excel document as a database using ADO.  I've
found several snippets of code on the subject but I'm not having any luck
getting it going.  So far I am using just this fragment of code to connect
but I'm getting an error that I don't know how to correct:

Code:

<?
$conn = new COM("ADODB.Connection");
$dsn = "DRIVER={Microsoft.Jet.OLEDB.4.0}; DBQ=" .
realpath("D:\public\testing\touchContactsWithTatumEmails.xls");
$conn->Open($dsn);
?>


Error:
Warning: Invoke() failed: Exception occurred. Source: Microsoft OLE DB
Provider for ODBC Drivers Description: [Microsoft][ODBC Driver Manager]
Data source name not found and no default driver specified in
D:\public\testing\excelCOM.php on line 10


I'm not sure what I am doing wrong or how to correct it.

If you have any information on this subject or have any ideas, I would be
grateful for your input.



-- Ron Herhuth
-- Senior Developer
-- [EMAIL PROTECTED]



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to