Thank you all, esp. Stph!  It works, however, the binding starts from 1 
instead.  Ed.


>From: Stephen Keller <[EMAIL PROTECTED]>
>To: "'Ed Ricci'" <[EMAIL PROTECTED]>,        Harrington Michael  
><[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: RE: How to call stored procedure?
>Date: Mon, 29 Apr 2002 08:36:14 -0700
>
>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
>




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx

Reply via email to