[freetds] 'Money' column types need an explicit convert
James K. Lowden
jklowden at freetds.org
Mon Aug 14 23:44:09 EDT 2006
Daniel Kasak wrote:
> my @values = ( $amount, $self->{clientid} );
>
> $self->{globals}->{common}->dbdo(
> $self->{globals}->{ms_dbh},
> "update Clients set DisputeAmount = ? where ID = ?",
> \@values
> );
Hi Daniel,
In that case, I think "perldoc DBI" is your friend. Have another look at
the bind_param() function; you can pass an attribute list of datatype
hints.
See also odbc_default_bind_type in DBD::ODBC. "DBD::ODBC will attempt to
query the driver via SQLDescribeParam to determine the correct type." I
wonder what "correct" means.
I don't know the state of our SQLDescribeParam(). It might be that we
don't provide DBD::ODBC with the answer it wants in the version you're
using.
My personal solution would be to skip all that. Replace the open SQL with
a stored procedure that accepts CHAR parameters and uses CAST to convert
them explicitly.
HTH.
--jkl
More information about the FreeTDS
mailing list