ranijoseph has asked for the wisdom of the Perl Monks concerning the following question:
Hi
Im using Perl 5, version 14.The Win32::ODBC is VERSION = '0.034'; and Oracle as database. Im able to reteive information from the database using quries like "emp_id, emp_name from emp" by the following code
use Win32::ODBC; $db= new Win32::ODBC("DSN=datasourcename;UID=username;PWD=passwrd") || + die "Error: " . Win32::ODBC::Error(); $db->Sql("SELECT emp_Id, emp_name, salary FROM Sample.Emp"); while($db->FetchRow()) { @values = $db->Data; print @values; } $db->Close();
Instead of using quries in the perl program, I like to use stored procedures. I have created a storedproc called sp_rank.
PROCEDURE sp_rank(p_cursorVar out CursorType) is begin open p_cursorVar for select emp_id, emp_name from emp; End sp_rank;
I would like to know how to pass storedproc name in the perl and retrieve the data.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Calling Oracle StoredProc using Win32:ODBC
by roboticus (Chancellor) on Jan 11, 2013 at 18:31 UTC | |
by mje (Curate) on Jan 14, 2013 at 13:21 UTC | |
by ranijoseph (Initiate) on Jan 11, 2013 at 20:30 UTC | |
by roboticus (Chancellor) on Jan 12, 2013 at 03:56 UTC | |
by Anonymous Monk on Jan 11, 2013 at 21:28 UTC | |
|
Re: Calling Oracle StoredProc using Win32:ODBC
by locked_user sundialsvc4 (Abbot) on Jan 11, 2013 at 22:14 UTC |