I have a stored procedure PROC which returns a 'reference' cursor,
which returns a single column for each row. I want to call the PROC,
and then call fetch on the cursor returned until it is exhaused. Based on
the Fine Manual... I have simplified this to:
$sql = qq(
BEGIN
PROC( :cursor );
END; );
$dbh->prepare( $sql );
$sth->bind_param_inout( ":cursor" ,\$sth2 ,0 ,{ ora_type=>ORA_RSET } );
$sth->execute(); #so far so good
#here is where my first problem is...
#I want to bind a perl variable to the column returned by the cursor
$sth2->bind_param( 1 , \$text );
#returns error: Can't bind unknown placeholder ':p1' (1)
#and
$sth2->bind_param( ":p1" ,\$text ,0 ,{ ora_type=>ORA_VARCHAR2 } );
#returns error: Can't bind unknown placeholder ':p1' (':p1')
1. How do I bind a variable to the column the reference cursor returns?
2. If my stored procedure takes an input (not inout) argument, how do I
bind the input argument without interpolating it literally into the sql
string that gets prepared?
Lincoln