Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Binding "Out" Parameters to Table Types for Oracle PL/SQL Stored Proceduresby enoch (Chaplain) |
on Jun 05, 2003 at 20:01 UTC ( [id://263484]=perlquestion: print w/replies, xml ) | Need Help?? |
enoch has asked for the wisdom of the Perl Monks concerning the following question:
I am having a problem getting Perl to bind OUT parameters correctly to Oracle stored procedures using
DBD::Oracle. Everything works fine when I am binding them to normal PL/SQL variable types such as
NUMBER, VARCHAR2, etc. The real gotcha comes when I try to bind parameters to data types defined in an Oracle
package as:
For example, say I create the ultra-simplistic package:
The Perl code to execute this and pull out the name of the department (dept_name) is simple and works just fine: That code correctly prints out the department name. Now, comes the kicker, let's say I want to write a procedure that returns all of the departments. That is, it returns the whole department table. Something like: It's a fairly simple procedure and works just fine. Now, I write the Perl code to execute it and gather the results. This returns the error that I am not using the right data type. So, my question is, how (assuming there is a way) can you bind Perl scalars to Oracle PL/SQL procedure OUT variables that are of a package-defined type? Can you? I have read over DBD::Oracle's POD examples, and I have read all the other pages I could find (Perl DBI Examples, DBI DBD::Oracle and OraPerl FAQ, etc.); and I can't find anything. Is there any Perl/Oracle-guru lurking around the Monastery? Thanks, enoch
Back to
Seekers of Perl Wisdom
|
|