Binding Cursors returned from PL/SQL stored procedure 
Author Message
 Binding Cursors returned from PL/SQL stored procedure

Binding Cursors
Following code i got from this site


Cursors can now be returned from PL/SQL blocks. Either from
stored procedure
OUT parameters or from direct OPEN statements, as show below:

use DBI;
use DBD::Oracle qw(:ora_types);
$dbh = DBI->connect(...);
$sth1 = $dbh->prepare(q{
???? BEGIN OPEN :cursor FOR
???????? SELECT table_name, tablespace_name
???????? FROM user_tables WHERE tablespace_name = :space
???? END;


$sth1->bind_param(":space", "USERS");
my $sth2;
$sth1->bind_param_inout(":cursor", \$sth2, 0, { ora_type =>
# $sth2 is now a valid DBI statement handle for the cursor

The only special requirement is the use of bind_param_inout()
with an
attribute hash parameter that specifies ora_type as ORA_RSET. If
you don't
do that you'll get an error from the execute() like: "ORA-06550:
line X,
column Y: PLS-00306: wrong number or types of arguments in call
to ...".


Here is my problem..

But it is not working for me . I am getting an error as follows..

"Can't bind :m_dispAcross_var, ora_type 0 not supported by DBD::Oracle
at line 21414."

I want to return set of rows to Perl program & process them in perl

Any help highly appreciated


Sent via http://www.*-*-*.com/
Before you buy.

Sun, 28 Jul 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. DBD::Oracle accessing stored procedures returning a ref cursor seg fault

2. Executing DEL and UPDT PL/SQL stored procedures from PERL

3. Executing DEL and UPDT PL/SQL stored procedures from PERL

4. pl/sql stored procedure with Table input

5. pl/sql stored procedure

6. OraPerl and PL/SQL Stored Procedure

7. LONG: Req: Help in retrieving values from SQL Server stored procedure using Win32::ODBC

8. ODBC, SQL Server, Stored Procedures

9. Perl Library to execute stored procedures in MS-SQL Server

10. SQL 2000 Stored procedure called from PERL not responding

11. Using Embedded SQL vs Stored procedures in Perl DBI?DBD for Oracle

12. ODBC, SQL Server, Stored Procedures


Powered by phpBB® Forum Software