vikas.rana has asked for the wisdom of the Perl Monks concerning the following question:
I am calling this procedure using the following statements:CREATE PROCEDURE MyProcedure( IN v_M_FILE_ID VARCHAR(20), INOUT v_M_TRL_REC_CNT_VAR_N INT, INOUT v_M_FILE_RUL_01_C VARCHAR(10), INOUT v_M_FILE_RUL_02_C VARCHAR(10), INOUT v_M_FILE_RUL_03_C VARCHAR(10), INOUT v_M_FILE_RUL_04_C VARCHAR(10), INOUT v_M_D_VLID_APPL_NM VARCHAR(20), INOUT v_M_D_VLID_TY_C VARCHAR(10))
On executing this piece of code, I am getting error as follows:my ($M_TRL_REC_CNT_VAR_N, $M_FILE_RULE_01_C, \ $M_FILE_RULE_02_C, $M_FILE_RULE_03_C, \ $M_FILE_RULE_04_C, $M_D_VLID_APPL_NM, \ $M_D_VLID_TY_C); $sql = "CALL MyProcedure(\'$file_id\', $M_TRL_REC_CNT_VAR_N, \'$M_FILE_RULE_01_C\', \'$M_FILE_RULE_01_C\', \'$M_FILE_RULE_01_C\', \'$M_FILE_RULE_01_C\', \'$M_D_VLID_APPL_NM\', \'$M_D_VLID_TY_C\')" ; $sth = $dbh->prepare( $sql_ref ) or die "Can't prepare statement $sql_ref: DBI::errstr"; $rc = $sth->execute or die "Can't execute statement: $DBI::errstr"; if ( $DBI::err ) { die "Can't execute statement: $DBI::errstr" ; }
If anybody has any idea about how to call stored procedures that have inout and out type of parameters, kindly provide some input !! Thanks in advance. VickyDBD::DB2::st execute failed: [IBM][CLI Driver][DB2/SUN] SQL0104N An unexpected token "," was found + following "LE_CTRL('fsaifdvd ',". Expected tokens may include: "<s +pace>". SQLSTATE=42601
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Calling Stored Procedure using DBI/DBD::DB2 on perl
by castaway (Parson) on Apr 21, 2004 at 11:38 UTC |