[freetds] Unable to connect to data source, SQL state S1000 in SQLConnect
Baris Simsek
bsimsek at empatiq.com
Mon Jun 20 07:02:53 EDT 2005
thanks, i've installed it. i wrote a php code to test it, and i did
following configuration (i found them in this ml archive)
lib paths are correct. i am not sure about port and tds version in
freetds.conf. Am i in correct way? is there any other way?
thanks,
regards,
conn.php
<?php
$conn = odbc_connect('saster', 'admin', 'opass') or die("connect error!");
?>
Full error message of this code: *Warning*: odbc_connect(): SQL error:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source, SQL
state S1000 in SQLConnect in */usr/local/www/data-dist/odbc/conn.php* on
line *3*
connect error!
odbc.ini
[ODBC Data Sources]
saster = VXM DB
[saster]
Driver = TDS
Servername = VXM
odbcinst.ini
[FreeTDS]
Description = FreeTDS unixODBC Driver
Driver = /usr/lib/libtdsodbc.so
UsageCount = 1
[TDS]
Description = FreeTDS
Driver = /usr/lib/libtdsodbc.so
freetds.conf
[VXM]
host=192.168.2.41
port=1433
tds version=8.0
client charset = utf-8
ZIGLIO, Frediano, VF-IT wrote:
>>Hello,
>>
>>i've installed freetds package on FreeBSD by portage system.
>>There is no
>>problem, i could do it. But i cannot find libdbodbc library.
>>I decided
>>to install it from original source. Do you have any idea
>>about following
>>problem:
>>
>># ./configure --prefix=/usr --enable-sybase-compat --with-unixodbc
>># make
>>
>>In file included from odbc.c:55:
>>../../include/tdsodbc.h:26: sql.h: No such file or directory
>>../../include/tdsodbc.h:27: sqlext.h: No such file or directory
>>../../include/tdsodbc.h:28: odbcinst.h: No such file or directory
>>In file included from odbc.c:60:
>>odbc_util.h:28: sql.h: No such file or directory
>>odbc_util.h:29: sqlext.h: No such file or directory
>>In file included from odbc.c:63:
>>prepare_query.h:28: sql.h: No such file or directory
>>prepare_query.h:29: sqlext.h: No such file or directory
>>*** Error code 1
>>
>>
>>
>
>You have to install unixODBC with development files (like includes) to
>compile with unixODBC support.
>
>freddy77
>_______________________________________________
>FreeTDS mailing list
>FreeTDS at lists.ibiblio.org
>http://lists.ibiblio.org/mailman/listinfo/freetds
>
>
>
>
More information about the FreeTDS
mailing list