freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] 'Money' column types need an explicit convert
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] 'Money' column types need an explicit convert
- Date: Mon, 14 Aug 2006 23:44:09 -0400
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
-
[freetds] 'Money' column types need an explicit convert,
Daniel Kasak, 08/14/2006
-
Re: [freetds] 'Money' column types need an explicit convert,
James K. Lowden, 08/14/2006
-
Re: [freetds] 'Money' column types need an explicit convert,
Daniel Kasak, 08/14/2006
- Re: [freetds] 'Money' column types need an explicit convert, James K. Lowden, 08/14/2006
-
Re: [freetds] 'Money' column types need an explicit convert,
Daniel Kasak, 08/14/2006
-
Re: [freetds] 'Money' column types need an explicit convert,
James K. Lowden, 08/14/2006
Archive powered by MHonArc 2.6.24.