Re: dbase connection on a remote computer in lan

From: Date: Fri, 30 Mar 2007 09:15:55 +0000
Subject: Re: dbase connection on a remote computer in lan
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26953@lists.php.net to get a copy of this message
Honestly, I would strongly advise against using PEAR DB for dbase files. It's just not suited to it, given that dbase is not an SQL database and is fundamentally very different to the databases DB was designed to connect to. I would instead suggest using the dbase functions within PHP directly. However, assuming that you decide to press on with DB: Quoting gasdia73 <gasdia73@gmail.com>:
im experiencing problems with the following code: <?php // connessione al db require_once "DB.php"; printf("prova connessione dbf:<br>"); $dsn = "dbase:///X:/DB/call_report.DBF"; $conn =& DB::connect ($dsn); if (DB::isError ($conn)) die ("Cannot connect: " . $conn->getMessage () . "\n"); ?> the result is : Cannot connect: DB Error: connect failed
There *should* be a more useful error message in $conn->getUserInfo(). Look for the section [nativecode=???], which will include the error message from dbase_open (if that failed) or an error message about the dbase file not existing if it couldn't be found and/or created. Adam -- Adam Harvey PEAR Profile: <http://pear.php.net/user/aharvey> Blog: <http://xn--9bi.net/>

« previous php.pear.general (#26953) next »