CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI:
Passing array parameter to oracle stored procedure

 



vpahwa
Novice

Sep 7, 2009, 3:26 AM

Post #1 of 2 (3878 views)
Passing array parameter to oracle stored procedure Can't Post

Hi All

I need to send an array parameter to oracle stored proc from perl5

Can anyone please tell me how exactly i can achieve the same?

Regards

Vishal


1arryb
User

Sep 16, 2009, 8:58 AM

Post #2 of 2 (3789 views)
Re: [vpahwa] Passing array parameter to oracle stored procedure [In reply to] Can't Post

Hi vpahwa,

After reading up on this subject, it doesn't appear (directly) possible with DBI. What you're going to have to do, I think, is:

1. Rewrite your Oracle procedure to use delimited string parameters instead of arrays (e.g., "VALUE1|VALUE2|VALUE3..."). If you aren't allowed to re-write the procedure, you can write an adapter procedure that does the parameter conversion and calls the original procedure.

2. In perl, convert your array to a delimited string before calling the procedure. Ditto (in reverse) for output parameters.

This approach is covered at: http://www.mail-archive.com/dbi-users@perl.org/msg32055.html.

Good luck,

Larry

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives