freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] MONEY fields
- Date: Wed, 28 Mar 2007 21:56:47 -0400
Daniel Kasak wrote:
> it seems impossible to update MONEY fields in SQL Server 7 from
> FreeTDS. I'm using DBD::ODBC ==> UnixODBC ==> FreeTDS ( latest versions
> of each ). I'm using a statement with placeholders ( for ALL values I'm
> updating, including the 2 fields it's complaining about below ), and
> when I try to prepare() it, I get:
>
> [unixODBC][FreeTDS][SQL Server]Statement(s) could not be prepared.
> (SQL-42000)
> [unixODBC][FreeTDS][SQL Server]Disallowed implicit conversion from data
> type varchar to data type money, table 'NUSsql.dbo.Recommendations',
> column 'Estimate'. Use the CONVERT function to run this query.
> (SQL-42000) [unixODBC][FreeTDS][SQL Server]Disallowed implicit
> conversion from data type varchar to data type money, table
> 'NUSsql.dbo.Recommendations', column 'ConfirmAmount'. Use the CONVERT
> function to run this query.
I'm not sure what you'd have FreeTDS do. Please don't take this the wrong
way, but from where I sit, it looks like an application problem. Or, if
you prefer, a missing server feature.
I think that message is being returned by the server when FreeTDS ships it
your prepared statement. You told it about the procedure parameters and
your host variable datatypes, and it complained to you about being asked
to convert varchar to money. You might reasonably ask what's so hard
about that? After all, isn't Microsoft pretty good at converting things
to money? Ignorance, say, or laziness? They seem to be able to convert
those into money. Alas, however that may be, varchar is not within their
alchemy. That they leave to you.
Tell me if I'm missing something.
--jkl
-
[freetds] MONEY fields,
Daniel Kasak, 03/28/2007
- Re: [freetds] MONEY fields, James K. Lowden, 03/28/2007
Archive powered by MHonArc 2.6.24.