On 2007-05-10 07:50:16 -0400, Jeffrey Seger wrote: > On your execution without a bound value, are you actually looking for rows > where the empno column is null? If so, try this: > > instead of > my @bind1 = (); > try: > my @bind1 = (undef); > > Otherwise, what exactly are you looking for?
As I understood Ramesh, the code wasn't supposed to do anything useful. He expected an error (e.g. "DBD::Oracle::st execute failed: called with 0 bind variables when 1 are needed"), but instead got a result. While the behaviour is documented (if you read closely enough), and also useful, it is somewhat surprising: When you use 2 placeholders in your query, and then invoke execute with 1 or 3 parameters, you get an error, that the number of bind variables doesn't match the prepared query. But if you invoke execute with 0 parameters, you don't get such an error. I don't see how this behaviour could be changed without breaking existing code, though. hp -- _ | Peter J. Holzer | If I wanted to be "academically correct", |_|_) | Sysadmin WSR | I'd be programming in Java. | | | [EMAIL PROTECTED] | I don't, and I'm not. __/ | http://www.hjp.at/ | -- Jesse Erlbaum on dbi-users
pgpl3fMDZfCnu.pgp
Description: PGP signature