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