Skip to Content.
Sympa Menu

freetds - RE: [freetds] odbc problem obtaining column name

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] odbc problem obtaining column name
  • Date: Mon, 19 Apr 2004 13:07:44 +0200

>
> >From an ODBC application, given a query like this
> "select user"
> where the column selected is not a real column, but
> a "psuedo column" or whatever the right term is...
>
> I'm trying to use SQLColAttribute to obtain the "column name"
> which I believe should be "USER".
>

No, user it's like a function, you haven't a column name.

> I've tried the SQL_COLUMN_NAME, as in
> SQLColAttribute ( stmtHandle, 1, SQL_COLUMN_NAME,
> colname, sizeof(colname),
> NULL, NULL);
>
> which succeeds, but returns an empty string in colname.
>
> If I modify the query to
> "select user as user"
>
> then I get the column name defined as I expect.
>
>
> Bug or Feature?
>
> Thanks
>

Feature :)

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page