[unixODBC-support] Problem using DSN stringonfunctionodbc_connect php4

Stefan Radman Stefan.Radman at CTBTO.ORG
Sun Mar 20 22:23:36 GMT 2005


> Warning: odbc_connect(): SQL error: [unixODBC]Client unable to
establish connection,
> SQL state S1000 in SQLConnect in /var/www/teste.php on line 4

At least you are one step further now. 
The earlier error message indicated that it was not able to find the
ODBC driver ({SQL Server}).
The latest error message comes from this (FreeTDS ODBC) driver
(/usr/lib/odbc/libtdsodbc.so).

Recommended reading:
http://www.freetds.org/userguide/prepodbc.htm

What if you create the DSN (in odbc.ini) with the "Database"  argument
and test it with isql?

[testit]
Driver=TDS
Server=192.168.1.50
Database=ADM

Once that works anything specified in odbc.ini should also work as
argument to odbc_connect()
IMHO

Stefan


> -----Original Message-----
> From: unixodbc-support-bounces at easysoft.com 
> [mailto:unixodbc-support-bounces at easysoft.com] On Behalf Of 
> Felipe Roman
> Sent: Friday, March 18, 2005 6:34 PM
> To: 'Support for the unixODBC project'
> Subject: RE: [unixODBC-support] Problem using DSN 
> stringonfunctionodbc_connect php4
> 
> 
> -----Original Message-----
> From: unixodbc-support-bounces at easysoft.com
> [mailto:unixodbc-support-bounces at easysoft.com] On Behalf Of Stefan
> Radman
> Sent: Friday, March 18, 2005 12:14 PM
> 
> > $con = odbc_connect("Driver={SQL Server}; Server=ODBC; 
> Database=ADM", 
> > "user", "pass");
> 
> > Try:
> > $con = odbc_connect("Driver=TDS; Server=192.168.1.50;
> Database=ADM","user", "pass")
> > Does that work?
> Not, return this warning but not get a valid ODBC link connect
> 
> Warning: odbc_connect(): SQL error: [unixODBC]Client unable 
> to establish
> connection, SQL state S1000 in SQLConnect in 
> /var/www/teste.php on line
> 4
> 
> Thanks
> 
> []'s
> 
> -- 
> Felipe Roman
> FONET-BR
> http://www.fonet-br.com
> felipe at fonet-br.com 
> 
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at easysoft.com
> http://mail.easysoft.com/mailman/listinfo/unixodbc-support
> 




More information about the unixODBC-support mailing list