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 21:46:58 +0100


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.

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.

> -----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