Hi Perl Monks
I'm trying to find a way to send an array to a stored sql procedure which interprets it as an cursor, i.e., example:
my @player_list = ('john','peter','mary','joseph'); #Prodedure $sth = $dbh->prepare(q(BEGIN :ret := Proc.getPlayerIds(:in_player_list +,:out_list_ids);END;) $sth->bind_param_inout(':ret',\$ret, 1024); $sth->bind_param(':in_player_list', \@player_list, 0, {ora_type => ORA +_RSET}) or croak sth->errstr; $sth->bind_param_inout('::out_list_ids', \$ids, 0, {ora_type => ORA_RS +ET}) or croak sth->errstr;
However, if i do this, i get the following error:
Uncaught exception form user code: DBI bind_param: invalid number of arguments: got handle +4, expected + between 1 and 2
My question is, how do I convert my array to a cursor, or how do i send it directly to the procedure?
Can anyone help me? Thanks
In reply to Send array to SQL procedure as a cursor by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |