Accesing SQL Base with PHP

comp.databases.gupta (1995-2015)
augustose

Accesing SQL Base with PHP

Post by augustose » 17 Jun 2006, 04:00

 Posted by:  augustose <Augu...@gmail.com> 

I finaly connected SQL Base with PHP.

Have some one experience about it ?

does any one use it ?

Regards,
Augusto Sosa Escalada

Dr. Klaus-Dieter Remmler

Re: Accesing SQL Base with PHP

Post by Dr. Klaus-Dieter Remmler » 22 Jun 2006, 16:54

 Posted by:  kdre...@boerner-it.de 

Dear Mr. Escalada,

it is possible to access SQLBase from PHP.

We use the following method:
1. ODBC driver from SQLBase
2. System data source with the above ODBC driver (It is important to
use system data sources - computer data sources doesn't work!)
3. PEAR-DB in PHP

The connection string is:
odbc://<User>:<Password>@<DSN>/<DB>

<User> = Username and <Password> = password (e.g. SYSADM:SYSADM)
<DSN> is the name of your ODBC data source and <DB> is the wished
database you want to be connected with.

Here a short PHP-Script:

require_once "DB.php";
$dsn = 'odbc://SYSADM:SYSADM@CenturaDB/Test';
$conn = DB::connect($dsn, TRUE);
if (!DB::isError($conn))
{
// Perform some actions....
$conn->disconnect();
}
else
{
print "Connection error..."
}

Hope it helps.
With the best regards from Germany

Dr. Klaus-Dieter Remmler

Return to “comp.databases.gupta”

Who is online

Users browsing this forum: [Ccbot] and 0 guests