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
In reply to DBD::ODBC and binding to a money column by thor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |