Ed, you asked about stored procedures in DBD::DB2 land...

According to the IBM CLI documentation, you can only call a stored procedure
with parameter place holders, which implies that you must use bind_param()
after you've prepared the statement instead of passing the values in
directly (as you show).  I've not tried this with Perl, but I would expect
it to work something like the following:

$sth=$dbh->prepare( 'CALL MYPROC(?,?)' );
$sth->bind_param(0, 'test');
$sth->bind_param(1, 'missing');
$sth->execute();


In the CLI Stored procedures use the same SQLExecuteDirect or
SQLPrepare/SQLExecute C calls that regular queries use.  The Perl driver
also uses these C calls, so using CALL in a prepare statement should work in
the DBD::DB2 driver just fine.  One caveat, however.  IBM does not document
any stored procedure call examples in its driver docs.  This suggests the
possibility that the IBM driver does not support such calls.  For
confirmation or an example, you might try a search on the IBM DB2 website:
http://www.ibm.com/db2.

Good hunting.

Stph

Reply via email to