How are you checking for NULL?

I normally use:

if (!defined $var)

http://www.orafaq.com/faqperl.htm#DBDNULL

-----------------
Ron Reidy
Lead DBA
Array BioPharma, Inc.


-----Original Message-----
From: Denesa K Shaw [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 09, 2005 7:24 AM
To: [email protected]
Subject: Null Values Returned from a Stored Procedure






How does a script handle when null values are returned from a stored
procedure?
 I checked for Null values in a individual string, but it seemed not to
make it to my if statement.
Thanks in advance.

my $sql = qq(
BEGIN
     package.procedure(:p1,:p2,TO_DATE(:p3,:fmt),:out_cursor);
END;
);

my $func = $dbh->prepare($sql);
$func -> bind_param(":fmt","mm/dd/yyyy" );
$func->bind_param(":p1",$TP_ID);
$func->bind_param(":p2",$INB_OUTB_IN);
$func->bind_param(":p3",$Formatted_RELOAD_FILE_TS);
$func->bind_param_inout(":out_cursor", \$out_cursor, 0,{ ora_type=>ORA_RSET
} );
$func->execute;

if( $@) ###Check for failure of executing the Stored Procedure
{
   ### warn "Execution of stored procedure failed: $DBI::errstr\n";
   warn TMH::writeConsole(*LOGFILE,"Execution of stored procedure failed:
$DBI::errstr\n");
   $dbh->rollback;
}


This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is 
intended 
to be for the use of the individual or entity named above. If you are not the 
intended recipient, please be aware that any disclosure, copying, distribution 
or use of the contents of this information is prohibited. Please notify the
sender  of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.

Reply via email to