Skip to Content.
Sympa Menu

freetds - Re: [freetds] Connect to Sybase ASA 8 with pear:DB

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Connect to Sybase ASA 8 with pear:DB
  • Date: Fri, 11 Jun 2004 17:39:20 -0400

On Thu, 10 Jun 2004, "Florian Kornhoffer" <f.kornhoffer AT laufwerk.de>
wrote:
>
> I'm not very successfull in connecting to our Sybase DB from our
> Webserver.
...
> require_once "DB.php";
>
> $dsn = array(
> 'phptype' => 'sybase',
> 'username' => 'dba',
> 'password' => 'xx',
> 'hostspec' => '62.153.x.x',
> 'port' => '2638',
> 'database' => 'testdb',
> );
>
> $db =& DB::connect($dsn);
> if (DB::isError($db)) {
> die($db->getMessage());
> }

You have an ASA server. I don't use PHP, but it looks like you're using
the sybase extension. Your server needs an entry in freetds.conf, and the
name of that entry must be the ASA database you want to connect to
('testdb'). I guess your 'hostspec' entry, above, would be that name, not
the server's IP address.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page