OK. Before suggesting that there is a DBI bug, did you go through the recommended routine checks?
- do you use strict?
- do you use warnings?
- are all variable initialized?
- what about using placeholders or $dbh->quote()?
The problem could be a syntax error in the SQL statement. Even if you say that you tested the statement in the database, what you tested was not the same, because it did not have embedded variables inside. So we shouldn't rule out the possibility of a quoting problem.
recommendations
-
You could use the DBI->trace(2) method, to find out where exactly the flow of info between client and server is broken, and what query was passed.
- You could reduce your script to the minimum instructions that reproduce the error, (using strict and -w). If you can do it without quoting problems, i.e. by hardcoding the SQL string, then we could rule out some more things and start considering the possibility of a bug.
- Have a look at some tutorials that could help you to find out what could be wrong: Reading from a database, Tricks with DBI and The fine art of database programming.
Please give us some more info.
_ _ _ _
(_|| | |(_|><
_|