Skip to Content.
Sympa Menu

freetds - [freetds] 'Money' column types need an explicit convert

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Daniel Kasak <dkasak AT nusconsulting.com.au>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] 'Money' column types need an explicit convert
  • Date: Tue, 15 Aug 2006 10:51:26 +1000

Hi all.

I've just noticed an error that was thrown by a simple update on a
'money' column.
The error was:

DBD::ODBC::db prepare failed: [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.Clients', column
'DisputeAmount'. Use the CONVERT function to run this query.
(SQL-42000)(DBD: st_prepare/SQLPrepare err=-1) at
.client_services/modules/common.pm line 108

I can deal with the problem - I'll either convert the column to
something other than money, or add a covert() function if I detect a
'money' column type. Anyway, the question is: is this a bug or a
feature? If something were going to add the explicit convert function,
would it be in FreeTDS, the ODBC driver ( DBD::ODBC ), or in my own
software? Just curious ...

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak AT nusconsulting.com.au
website: http://www.nusconsulting.com.au




Archive powered by MHonArc 2.6.24.

Top of Page