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: Tue, 29 Nov 2011 12:53:49 -0600


Steve --

I too enjoyed James' essay. However, what concerned me most about
your findings was that the ODBC Function SQLColAttribute( ... )
'lied' or it 'made something up' rather than saying 'I dunno' or
'NULL' or undef or 'mind your own business'.

It sounds like Freddie fixed an honest-to-goodness bug in the CSV
Head so that SQLColAttribute() now returns proper SQL Types.

-- kjh


Steve Teale wrote, On 11/29/2011 09:58 AM:
Andrew,

Yes, you can look at table metadata, and it's not difficult, but as JK
so eloquently points out, that won't help you with 'columns' that are
function results or literals or something else that is not a column
defined in a table.

My bitching was just because I was using the ancient version of FreeTDS
that you get from the Ubuntu package management system. Once I'd built
and installed the FreeTDS version from CVS, everything was fine, and I
get just the same results as from the 'native client' driver on Windows,
which suit my purpose very well.

Steve

On Tue, 2011-11-29 at 09:37 -0500, Andrew H. Wakefield wrote:
JK,

You are waxing very poetic these days! I am enjoying reading these
answers, not least because I keep learning new things.

However, it seems to me that there is another approach that might
satisfy the OP's needs. Why not query the metadata using the appropriate
Transact SQL commands? (I'd have to dig around a bit to remember exactly
how to do this, but IIRC, it is certainly not difficult.)

ahw



_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds





Archive powered by MHonArc 2.6.24.

Top of Page