>>> "Ronald J Kimball" <[EMAIL PROTECTED]> 08/13/04 01:59PM >>>
Hardy Merrill [mailto:[EMAIL PROTECTED] wrote:
> 
> Just in case the op doesn't make the connection, he needs to test
his
> variables for undef before the execute, and if one is undef, then
put
> null("") in it, something like this:
> 
>      if (!defined($a)) {$a = "";}
>      if (!defined($b)) {$b = "";}
>        ... and so on - you get the idea...
>      $sth=$dbh->prepare(insert into OPER_QUERY values
(?,?,?,?,....?)
> )
>      $sth->execute($a,$b,$c,$d,...$x) or die;

Why does he need to do that?  I have never had to test my bind values
for
defined-ness when using placeholders.  An undef in Perl becomes a NULL
in
Oracle, and vice versa.

Ronald

------------------------
I have to plead ignorance - I thought his problem was caused by one or
more the variables (being passed to placeholders) being undefined. 
Sorry, I must not have read his post well enough that included the
actual error(s).

Hardy

Reply via email to