[unixODBC-support] unixODBC 2.2.11 & MSSQL 2005

Vincent Barbier vbperso at gmail.com
Wed Nov 1 23:00:07 GMT 2006


Hi,

I am trying to connect to a MSSQL 2005 from a FreeBSD box (5.5 & 6.1) using
unixODBC 2.2.11
but I am not able to retrieve data with isql whereas I am able to do it with
tsql...

$ cat /usr/local/etc/odbc.ini

[ODBC Data Sources]
MSSQL = MSSQL 2005

[MSSQL]
Driver =/usr/local/lib/libtdsodbc.so
Description = MSSQL 2005
Trace = no
Server = srv-app.domain.com
Database = SBO_DOMAIN
Port = 1443
TDS_Version = 8.0

[Default]
Driver = /usr/local/lib/libtdsodbc.so

When I use this configuration whith isql, I am able to connect to MSSQL
but when I launch a SQL command I get this error:

$ isql -v MSSQL sa password
SQL>use SBO_DOMAIN
[ISQL] Error: Could not SQLPrepare
SQL>

When I look in sql.log I can this many errors:

[ODBC][92649][SQLPrepare.c][189]
                              Entry:
                                         Statement = 0x8069800
                                         SQL = [use SBO_DOMAIN][length = 14
(SQL NTS)]
[ODBC][92649][SQLPrepare.c][364]
                              Exit: [SQL_ERROR]
[ODBC][92649][SQLPrepare.c][342]
                              Entry:
                                         Statement = 0x8069800
                                         SQLState = 0xbfbfea10
                                         Native = 0xbfbfea08
                                         Message Text = 0xbfbfea20
                                         Buffer Lenght = 500
                                         Text Len Ptr = 0xbfbfea0e
[ODBC][92649][SQLError.c][379]
                               Exit: [SQL_NO_DATA]
...

I am new to ODBC so if someone has an idea...


Thanks in advance,

--
Vince.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20061102/b9c0332e/attachment.html>


More information about the unixODBC-support mailing list