Skip to Content.
Sympa Menu

freetds - Re: [freetds] SQLGetData() returns TEXT length minus one on Solaris 64b with SQL Server 2005

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Cc: "freetds AT lists.ibiblio.org" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SQLGetData() returns TEXT length minus one on Solaris 64b with SQL Server 2005
  • Date: Sat, 2 Feb 2013 07:52:12 +0000

Il giorno 31/gen/2013, alle ore 14:28, Sebastien FLAESCH <sf AT 4js.com> ha
scritto:

> Hi all,
>
> Context:
>
> $ uname -a
> SunOS s64x100 5.10 Generic_120012-14 i86pc i386 i86pc
>
> FreeTDS versions tested:
> - freetds-0.92.dev.20120312
> - freetds-dev.0.92.377
>
> When fetching a TEXT from the database (SQL Server 2005), using
> SQL_DATA_AT_EXEC,
> it appears that the SQLGetData() function returns the size of the text data,
> minus one...
>
> I have tested the same FreeTDS version on a Linux 32b, and SQLGetData()
> returns
> the correct length as expected...
>

Strange! How do you read the length?

> I will continue to investigate, but I wanted to ask if this is a know issue.
>
> When connecting to SQL Server 2008 R2, this does not occur, because
> SQLGetData()
> returns SQL_NO_TOTAL and we fetch text pieces in a different way...
>

This is done to deal with different encodings.

> Thanks
> Seb

Frediano





Archive powered by MHonArc 2.6.24.

Top of Page