thor has asked for the wisdom of the Perl Monks concerning the following question:
I was helping someone write a tool at work yesterday when I hit a snag in using the DBI that has me a bit confused. We were searching a table on an MS-SQL database using DBD::ODBC as the connecting module. Let's say for the sake of argument that the query was something like
$sth=$dbh->prepare(q(select * from table_name where money_column=?));
When we tried to run that query by using $sth->execute(7), we got an error saying that you couldn't bind a varchar to a money column. FUBAR! I found a reference to this problem here, but I find it hard to believe that it's been over 4 years and this problem still exists. I'd rather not go through the bind_column business mentioned in that node, but if that's what it, so be it.
thor
Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DBD::ODBC and binding to a money column
by mpeppler (Vicar) on Dec 16, 2004 at 15:24 UTC | |
Re: DBD::ODBC and binding to a money column
by r34d0nl1 (Pilgrim) on Dec 16, 2004 at 18:30 UTC | |
Re: DBD::ODBC and binding to a money column
by redhotpenguin (Deacon) on Dec 16, 2004 at 14:31 UTC | |
by jfroebe (Parson) on Dec 16, 2004 at 16:11 UTC | |
Re: DBD::ODBC and binding to a money column
by kgraff (Monk) on Dec 16, 2004 at 15:32 UTC |