Skip to Content.
Sympa Menu

freetds - Re: ints don't work, trailing null on strings

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Bob Kline <bkline AT rksystems.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: ints don't work, trailing null on strings
  • Date: Wed, 18 Oct 2000 13:10:06 -0400 (EDT)


On Wed, 18 Oct 2000, James Ponder wrote:

> Expected |abcdef|, found |abcdef|
> dblib failed for t0009.c
>
> Which is a strange error, to say the least :-)

Well, sure, but if you look at the source code for the test, it's pretty
easy to see what that problem is:

dbcmd(dbproc,
"create table dblib0009 (i int not null, s varchar(10) not null)");

... followed by:

if (0 != strcmp("abcdef ", teststr))
{
fprintf(stderr, "Expected |%s|, found |%s|\n", "abcdef", teststr);
fprintf(stderr, "dblib failed for %s\n", __FILE__);
exit(1);
}

... which is making the comparison as if the column were CHAR instead of
VARCHAR.

Do you have source code for a repro case?

--
Bob Kline
mailto:bkline AT rksystems.com
http://www.rksystems.com






Archive powered by MHonArc 2.6.24.

Top of Page