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 15:36:41 +0100


Thanks Don,

This should give me enough to be going on with.

Bill

> -----Original Message-----
> From: Don Burden [SMTP:donb AT zirmed.com]
> Sent: Friday, July 26, 2002 3:34 PM
> To: TDS Development Group
> Subject: [freetds] RE: Still problems with text fields?
>
>
>
> > -----Original Message-----
> > From: Thompson, Bill D (London) [mailto:ThompBil AT exchange.uk.ml.com]
> > Sent: Friday, July 26, 2002 9:53 AM
> > To: TDS Development Group
> > Subject: [freetds] RE: Still problems with text fields?
> >
> >
> > Thanks for all that. Just the evidence I need.
> > I can see all the characteristics of our old convert code
> > being manifested
> > here. We just need to fix it.
> > It also looks to me that the interface is pretty simple. You
> > get what's in
> > the database, null terminated.
> >
> > One more test you could run for me, with code running on
> > Win2000, compiled
> > with .NET C++, accessing SQL2000:
> >
> > Try this:
> >
> > SQLCHAR sID[21]
> > ...
> > SQLBindCol(hstmt, 1, SQL_C_CHAR, sID, 20, &cbzName);
> >
> > and the database column defined as char(30), and filled up
> > with data to that
> > length
> >
> > do you get an error (because you haven't defined a variable
> > big enough to
> > hold the data)
> > or does ODBC just truncate the data ?
> >
> >
>
> Field defined as char(30), filled with "123456789012345678901234567890".
> Retcode checked after SQLBindCol and each SQLFetch and no errors.
> Looks like the length parameter in SQLBindCol includes the null at the end
> and needs to be 21 if you want 20 chars.
>
> //1234567890123456789//
> //1234567890123456789//
> //1234567890123456789//
> //1234567890123456789//
> //1234567890123456789//
> //1234567890123456789//
> //1234567890123456789//
>
> ---
> 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