Skip to Content.
Sympa Menu

freetds - [freetds] MS SQL 2005

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Vincent Barbier" <vbperso AT gmail.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] MS SQL 2005
  • Date: Thu, 2 Nov 2006 12:11:20 +0100

Hi,

I am trying to connect to a MSSQL 2005 from a FreeBSD boxes (5.5 & 6.1)
using unixODBC 2.2.11
and freetds 0.63 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.




Archive powered by MHonArc 2.6.24.

Top of Page