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

Daniel Kasak dkasak at nusconsulting.com.au
Mon Aug 14 20:51:26 EDT 2006


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



More information about the FreeTDS mailing list