Skip to Content.
Sympa Menu

freetds - [freetds] DBD::ODBC (perl) and SQLDescribeParam

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Higgins <linux AT evolone.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] DBD::ODBC (perl) and SQLDescribeParam
  • Date: Fri, 24 Jul 2009 12:34:34 -0700

FreeTDS --

Without SQLDescribeParam, DBD::ODBC, doesn't know how to cast so to bind
place holders (?) and SQL Server 2000 (for example) throws an error on some
columns when preparing a statement. Like the 'money' data_type.

Yes, it's amusing. M$FT can cast all kinds of useless things as money, just
not my default data_type varchar.

Default data_type is wrong (s/b like, decimal anyway), I hear, because
there's nothing from the driver to tell us what it is. No SQLDescribeParam,
so the prepare call always fails. (I'd like to think there was something else
returned that would provide the column data type when preparing a statement,
but I can't make sense of any of this code -- and this is just what I've been
told.)

So is there any current development to get this API hook, or whatever it is
called, implemented in FreeTDS? I did see it marked TODO... "SQLDescribeParam
(Sybase seems to require it)". But it seems like it's required elsewhere
too... if that matters.

Anyway, though it's possible to work around with casting the statement place
holders, it's not very elegant. I'd like to think it'd be very cool to have
it fixed so things built atop DBD::ODBC work better 'out of the box', as it
were...

Aside from tests on MSSQL 2000, there's not much help I can provide. Not
trained to code in anything, let alone 'c', I'm at my limit even trying to
describe the problem. ;-)

Cheers,

--
|\ /| | | ~ ~
| \/ | |---| `|` ?
| |ichael | |iggins \^ /
michael.higgins[at]evolone[dot]org




Archive powered by MHonArc 2.6.24.

Top of Page