Skip to Content.
Sympa Menu

freetds - Re: [freetds] Determining column type

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Konrad J Hambrick <konrad AT payplus.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Determining column type
  • Date: Thu, 24 Nov 2011 08:03:47 -0600


Steve Teale wrote, On 11/23/2011 04:40 AM:
Can you think of any way that I can get SQL Server 2008 R2 to report the
as-defined-in-table column type in the context of a just-executed
SQLExecute() or SQLExecuteDirect().


Steve --

Curious ... Do you get the same results

FLOAT => float,
BIGINT => float,
VARCHAR => varchar,
DATE => varchar,
TIME => varchar

If you invoke SQLColAttribute on the prepared statement BEFORE execution ?

As noted in a previous post, the column types causing the problem are
BIGINT, TIME, and DATE. For example if I have a table with columns
(FLOAT, BIGINT, VARCHAR, DATE, TIME), then the list of types that I get
through SQLColAttribute(hstmt, SQL_DESC_TYPE_NAME, ...) in protocol
version 7.2 will be (float, float, varchar, varchar, varchar) - which in
the context of what I want to do is not that helpful.

What if you bump your Protocol Version to 8.0 ?

-- kjh( not an Expert, or even a sophisticated User, more like a happy
FreeTSD Abuser )




Archive powered by MHonArc 2.6.24.

Top of Page