Skip to Content.
Sympa Menu

freetds - Re: [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 Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] MS SQL 2005
  • Date: Thu, 2 Nov 2006 15:33:10 +0100

2006/11/2, Frediano Ziglio <freddyz77 AT tin.it>:

Il giorno gio, 02/11/2006 alle 12.11 +0100, Vincent Barbier ha scritto:
> 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,
>

Please use 0.64 as 0.63 have some problems with RPC (required for
SQLPrepare) and mssql2005. tsql do not use prepared statements so it do
not have this problem.


I have upgrade to 0.64 and it works like a charm!

Thanks a lot.

--
Vince.




Archive powered by MHonArc 2.6.24.

Top of Page