Skip to Content.
Sympa Menu

freetds - RE: ODBC and column names

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: ODBC and column names
  • Date: Tue, 27 Aug 2002 22:02:49 +0100


Brian,

You're right on both points of course.

Bill

> -----Original Message-----
> From: Brian Bruns [SMTP:camber AT ais.org]
> Sent: Tuesday, August 27, 2002 9:59 PM
> To: TDS Development Group
> Subject: [freetds] RE: ODBC and column names
>
> On Tue, 27 Aug 2002, Thompson, Bill D (London) wrote:
>
> > Hi Paul,
> >
> > 1) ODBC itself wouldn't "require" uppercasing column labels...and the
> manual
> > pages I've looked at don't say either...seems to me that some databases
> that
> > could be queried with ODBC are case sensitive when it comes to things
> like
> > column names (although SQL 7/2000 are case insensitive). I would say we
> > should pass back to the calling program whatever the database has sent
> to
> > us. That would seem like commonsense.
>
> SQL 7/2000 may be, but Sybase isn't so we need to support that. This
> could be an attempt to match the SQL Server ODBC driver behaviour, but i'd
>
> think it's ok to diverge here.
>
> > 2) You're right that's a bug. It should return the truncated length, if
> > truncation has happened.
> > the buffer passed to sqldescribecol needs to be sufficient to hold the
> > column name + the null terminator.
>
> See my other message on this one. According to my read of the
> documentation we are doing the right thing.
>
> > > -----Original Message-----
> > > From: Paul Rensing [SMTP:prensing AT cimetrics.com]
> > > Sent: Tuesday, August 27, 2002 9:25 PM
> > > To: TDS Development Group
> > > Subject: [freetds] ODBC and column names
> > >
> > > I was having trouble with column names in ODBC and ran across the code
> > > in SQLDescribeCol(). In there, it uppercases the column names and
> > > truncates them to the size of the provided space.
> > >
> > > So, 2 questions.
> > >
> > > 1) Does ODBC require uppercasing of column labels?
> > >
> > > 2) If it truncates the name, there seems to be a bug in that, in the
> > > variable pcbColName, it returns the real length of the string, not the
> > > truncated length. What is it supposed to return?
> > >
> > > Thanks.
> > >
> > > Paul Rensing
> > >
>
>
> ---
> 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