Re: ODBC connection fails

From: Date: Mon, 25 Mar 2002 13:38:26 +0000
Subject: Re: ODBC connection fails
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1048@lists.php.net to get a copy of this message
Drago Bokal wrote: > > Hallo, > > I am using the pear DB class and would like to ask for a hint. > > if I connect with the DSN > > pgsql://$user:$pass@$host/$DBName > > everything works fine. But then I have set up an ODBC on the > localhost to access the same database, as I want to be flexible and > maybe mount the ODBC to some other source. But when I try to > connect with > > odbc://$user:$pass@localhost/$DBName > > it returns an error Connection failed. > > Can you please hint me in which direction should I look for fixing the > error? In ODBC the host is always the ODBC DS (see the php odbc_connect() function), not really a tcp host. Try removing it. Something like: odbc://$user:$pass@$DBName For DS less systems: odbc://$user:$pass@ Or without auth but with DS odbc://$odbcds We recognize also some odbc variations like: access, solid and navision. You could specify them with: odbc(access)://... Tomas V.V.Cox

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