Skip to Content.
Sympa Menu

freetds - [freetds] dblib either truncates nvarchar, or makes NULLs empty strings

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Jeffrey Shaw <shawjef3 AT gmail.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] dblib either truncates nvarchar, or makes NULLs empty strings
  • Date: Fri, 20 Mar 2015 11:05:45 -0400

Hello,
I am having two problems. If I set the tds version to 7.1, empty strings
are selected as NULL.

If I set the tds version to something else, strings longer than 255
characters are truncated.

My guess is that in the case of tds version 7.1, types marked with * at
http://www.freetds.org/tds.html#types are using "size == 0" when checking
for null, rather than the correct "size == -1". "size == 0" is an empty
string, whereas "size == -1" is NULL.

It isn't clear to me where in the source this check is happening, so I'm
applying here for help.

I've tried CentOS 7's FreeTDS .91 and also freetds-dev-0.92.965.

Thanks,
Jeff



  • [freetds] dblib either truncates nvarchar, or makes NULLs empty strings, Jeffrey Shaw, 03/20/2015

Archive powered by MHonArc 2.6.24.

Top of Page