> 2009/11/2 Timothy Legg <php_l...@timothylegg.com>:
>> Hello,
>> I have PHP Version 5.2.6-1+lenny3
>> I have been having difficulty using odbc_connect with an MS Access MDE
>> database. Â I do have php5-mysql and php5-odbc installed on this server.
>> Due to the rather poor search results regarding the topic of querying
>> MDE
>> files with PHP, I am becoming increasingly concerned that this file type
>> is not supported.
>> Is it possible to query an MDE file via PHP5 or should I try different
>> approach to querying the database from our linux server? Â I am
>> interested
>> in your thoughts.
>> Thanks for your help.
>> Tim Legg
> If you have the MS Access ODBC driver installed, then have you tried
> accessing the MDE as an MDB?

Yes, I have.  The username and password are arbitrarily set since the
management hasn't provided that data for me yet.  But I am not far enough
along to have run into a user rights issue.  I get a warning and also an
error upon interpreting the page.  I have checked the path to the database
file, and it is correct.  I also checked file ownership and readability
permissions, too.  So maybe the name of the driver is wrong; it does look
a little verbose to me, but it did come straight from the php.net online

Error messages and source is below.  Sorry, I modified the domain name in
the path for privacy.

Warning: odbc_connect() [function.odbc-connect]: SQL error:
[unixODBC][Driver Manager]Data source name not found, and no default
driver specified, SQL state IM002 in SQLConnect in
/var/www/www.example.com/ht-secure/database_entry/test.php on line 9

$mdbFilename = "/root/tims_db.mde";
$user = "root";
$password = "1248163264";

$connection = odbc_connect("Driver={Microsoft Access Driver
(*.mdb)};Dbq=$mdbFilename", $user, $password);


Thanks for looking this over,

Tim Legg

> --
> -----
> Richard Quadling
> "Standing on the shoulders of some very clever giants!"
> EE : http://www.experts-exchange.com/M_248814.html
> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> ZOPA : http://uk.zopa.com/member/RQuadling

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

Reply via email to