########################################
use DBI;
use DBD::DB2::Constants;
use DBD::DB2;

$dbh = DBI->connect("dbi:DB2:TEST", "admin", "admin");

#$sql = "CALL TEST.WRITEFILESTATUS ('test','missing')";
$sql = "INSERT INTO TEST.FILE_TABLE (FILE, STATUS) VALUES ('Tone', 
'Missing')";

$sth = $dbh->prepare($sql);
$sth->execute();
....
#######################################

It works for the 2nd $sql (a normal insert statement) but it fails for the 
1st $sql (call a stored procedure instead).

The error:
DBD::DB2::st execute failed: [IBM][CLI Driver][DB2/NT] SQL1109N  The 
specified DLL "TEST.WRITEFILESTATUS" could not be loaded.

When I paste and run the 1st $sql: "CALL TEST.WRITEFILESTATUS 
('test','missing')" in the DB2 command centre and it works.

Please let me know how I should invoke stored procedures within Perl.

Many Thanks.

Ed






_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Reply via email to