Re: Determining column type

Konrad J Hambrick <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Organization PayPlus Software, Inc
Message-ID <[email protected]>
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 )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.