trying this code : --------------------------- BEGIN <?php require_once('/var/www/classes/adodb/adodb.inc.php'); $db = '/var/tmp/db1.mdb'; $dsn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db"; //$dsn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db"; $sourceDB =& ADONewConnection('access'); $sourceDB->Connect($dsn) or die('here'); $res = $sourceDB->Execute('SELECT * FROM Modelos;'); echo 'err: '; echo $sourceDB->ErrorMsg(); $rows = $res->GetRows($res); print_r($rows); ?> --------------------------- END i get this error : *Warning*: odbc_connect() [function.odbc-connect<http://localhost/test/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/classes/adodb/drivers/adodb-odbc.inc.php* on line *60* here On 9/7/06, Fourat Zouari <fourat@xxxxxxxxx> wrote:
i want to understand something : when using a dsn like this with adodb : "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=/var/tmp/etiq.db" should i have an ODBC layer or not ? On 9/7/06, Joe Wollard <joe.wollard@xxxxxxxxx> wrote: > > I think kOffice can read mdb files on Linux - maybe that would be a > good starting point for research. Perhaps they have built a kind of > API to allow other programs to do the same......then again, maybe not > - but like I said, it's some place to start. > > > On Sep 7, 2006, at 7:57 AM, Fourat Zouari wrote: > > > it's a PHP question : how can we access Ms Access mdb files without > > ODBC ? > > > > On 9/7/06, Angelo Zanetti < angelo@xxxxxxxxxxxx> wrote: > >> > >> > >> > >> Fourat Zouari wrote: > >> > >> > Hello all, > >> > I need to create a script that can open a connection to a > >> given .mdb > >> file > >> > (Microsoft Access) and do some light selects on it, anyway ... > >> > The problem that i wont create an ODBC instance, i wont and cant > >> install > >> > ODBC support on the server for the unique purpose of doing that > >> on the > >> > mdb > >> > file. > >> > I'm seeking how to do such thing on a Linux env (no COM) and > >> without > >> > ODBC, > >> > googling, i found that AdoDB doesnt do it (?) and PDO didnt got a > >> support > >> > for that (?) > >> > Any helpers around ? thanks > >> > > >> > >> what does this have to do with PHP? > >> > >> -- > >> --------------------------------------------------------------------- > >> --- > >> Angelo Zanetti > >> Systems developer > >> --------------------------------------------------------------------- > >> --- > >> > >> *Telephone:* +27 (021) 469 1052 > >> *Mobile:* +27 (0) 72 441 3355 > >> *Fax:* +27 (0) 86 681 5885 > >> * > >> Web:* http://www.zlogic.co.za > >> *E-Mail:* angelo@xxxxxxxxxxxx <mailto:angelo@xxxxxxxxxxxx> > >> > >