Nesh has asked for the wisdom of the Perl Monks concerning the following question:
. Now I connect to the database and try to execute the stored procedure as belowPACKAGE Par_Reports_Pos AS PROCEDURE SUN_PRC_AT_I_POSM1D002(retCode OUT NUMBER, retMsg OUT VARCHA +R2); END Par_Reports_Pos;
I am trying to get the return code and return message after $sth->Execute. But I think that I am passing the wrong parameter in output binding. Please correct me. Thanksuse DBI; my $dsn ="dbi:Oracle:$myDSN"; $dbh = DBI->connect ($dsn, $user, $password, { PrintError =>1, RaiseError =>1}); if (!$dbh) { print "Error connecting to database; $DBI::errstr\n"; exit(-1); } print "After Connection\n"; $sth = $dbh->prepare(q{BEGIN Par_Reports_Pos.sun_t_attm_temp_posm1d002 (:parameter1, :parameter2 ); END; }); my $outretcode = $sth->bind_param_inout('retCode', 100); my $outretmsg = $sth->bind_param_inout('retMsg', 100);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Input output binding using DBI
by mifflin (Curate) on Apr 06, 2005 at 00:03 UTC | |
by Nesh (Beadle) on Apr 06, 2005 at 00:46 UTC | |
by mifflin (Curate) on Apr 06, 2005 at 01:50 UTC | |
|
Re: Input output binding using DBI
by Thilosophy (Curate) on Apr 06, 2005 at 01:32 UTC | |
by Nesh (Beadle) on Apr 06, 2005 at 19:24 UTC | |
by Thilosophy (Curate) on Apr 07, 2005 at 00:36 UTC |