[freetds] Can't call databasepropertyex() on MSSQL over tds version 8.0

Rafael Kitover rkitover at cpan.org
Mon Apr 5 08:29:52 EDT 2010


I forgot to give my freetds version:

rkitover at hlagh ~/src/sl % dpkg -l '*freetds*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version                       Description
+++-=============================-=============================-==========================================================================
ii  freetds-bin                   0.82-6                        FreeTDS command-line utilities
ii  freetds-common                0.82-6                        configuration files for FreeTDS SQL client libraries
ii  freetds-dev                   0.82-6                        MS SQL and Sybase client library (static libs and headers)

this is from Debian unstable.

On Mon, Apr 05, 2010 at 12:36:30AM -0400, Rafael Kitover wrote:
> Hi guys,
> 
> Suppose in my /etc/freetds/freetds.conf I have:
> 
> [global]
>         tds version = 7.0
> 
> Then this works:
> 
> echo "select databasepropertyex(DB_NAME(), 'Collation')\ngo" | tsql -H server -p 5000 -U sa -P pass
> locale is
> "LC_CTYPE=en_US.utf8;LC_NUMERIC=en_US.UTF-8;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=en_US.UTF-8;LC_ADDRESS=en_US.UTF-8;LC_TELEPHONE=en_US.UTF-8;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=en_US.UTF-8"
> locale charset is "UTF-8"
> 1> 2> 
> SQL_Latin1_General_CP1_CI_AS
> (1 row affected)
> 1> %
> 
> If I change it to:
> 
> [global]
>         tds version = 8.0
> 
> Then the query no longer works:
> 
> echo "select databasepropertyex(DB_NAME(), 'Collation')\ngo" | tsql -H server -p 5000 -U sa -P pass
> locale is
> "LC_CTYPE=en_US.utf8;LC_NUMERIC=en_US.UTF-8;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=en_US.UTF-8;LC_ADDRESS=en_US.UTF-8;LC_TELEPHONE=en_US.UTF-8;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=en_US.UTF-8"
> locale charset is "UTF-8"
> 1> 2>
> NULL
> (1 row affected)
> 1> %
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds



More information about the FreeTDS mailing list