Skip to Content.
Sympa Menu

freetds - RE: Still problems with text fields?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <ThompBil AT exchange.uk.ml.com>
  • To: "'TDS Development Group'" <freetds AT franklin.oit.unc.edu>
  • Subject: RE: Still problems with text fields?
  • Date: Fri, 26 Jul 2002 09:01:02 +0100


Hi All,

I'll take a look at this. Thus far in my "convert" travels I haven't looked
at ODBC. I'll now take a look.

Bill

> -----Original Message-----
> From: Don Burden [SMTP:donb AT zirmed.com]
> Sent: Thursday, July 25, 2002 4:24 PM
> To: TDS Development Group
> Subject: [freetds] Still problems with text fields?
>
> Is there still a bug with length of text fields or am I doing anything
> wrong?
>
> Using yesterdays nightly build of freeTDS. Accessing SQL2000 database.
> Here's my code:
>
> .....
> SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
> SQLBindCol(hstmt, 1, SQL_C_CHAR, sCol1, -1, &cbCol1);
> SQLExecDirect(hstmt, "SELECT id FROM TEST", SQL_NTS);
> while(SQLFetch(hstmt)==0)
> fprintf(stdout, "%s\n", sCol1);
> .....
>
> Here is the TEST table:
>
> id
> ======
> 12345
> 123456
> 1234567
> 123456
> 12345
>
> If id field is defined as varchar, output is ok:
>
> 12345
> 123456
> 1234567
> 123456
> 12345
>
> If id field is defined as text, output is like this:
>
> 12345
> 12345
> 1234567@
> 1234567@
> 1234567@
>
> ---
> You are currently subscribed to freetds as: [thompbil AT exchange.uk.ml.com]
> To unsubscribe, forward this message to
> $subst('Email.Unsub')





Archive powered by MHonArc 2.6.24.

Top of Page