freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Brian Bruns <camber AT ais.org>
- To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
- Subject: Re: ODBC and column names
- Date: Tue, 27 Aug 2002 16:52:24 -0400 (EDT)
On 27 Aug 2002, Paul Rensing wrote:
> 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?
I don't know about this one, but since Sybase is case sensitive it seems a
bug. For databases that are case insensitive (ie DB2), it would probably
be ok.
> 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?
Description:
Bytes available to return for ColumnName argument. Truncation of column
name (ColumnName) to BufferLength - 1 bytes occurs if NameLengthPtr is
greater than or equal to BufferLength.
My reading of this is that the number of bytes available is returned, and
pcbColName is truncated if necessary, allowing the program to increase
it's buffer size and reinvoke the function if necessary. So, the code
seems to be correct on this point.
>
> Thanks.
>
> Paul Rensing
>
-
ODBC and column names,
Paul Rensing, 08/27/2002
- <Possible follow-up(s)>
- RE: ODBC and column names, Thompson, Bill D (London), 08/27/2002
- Re: ODBC and column names, Brian Bruns, 08/27/2002
- RE: ODBC and column names, Brian Bruns, 08/27/2002
- RE: ODBC and column names, Thompson, Bill D (London), 08/27/2002
- RE: ODBC and column names, Lowden, James K, 08/27/2002
- RE: ODBC and column names, Brian Bruns, 08/27/2002
- RE: ODBC and column names, Eric Deutsch, 08/27/2002
- RE: ODBC and column names, Lowden, James K, 08/27/2002
- RE: ODBC and column names, Thompson, Bill D (London), 08/27/2002
- RE: ODBC and column names, Varley, David(CBorn at Alcoa), 08/27/2002
- RE: ODBC and column names, ZIGLIO Frediano, 08/28/2002
- RE: ODBC and column names, Lowden, James K, 08/28/2002
Archive powered by MHonArc 2.6.24.