Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about Oracle Stored Procedure sessions from PB

Status
Not open for further replies.

Statey603

Programmer
Nov 10, 2009
196
0
0
US
Hello,

I have a PowerBuilder windows application developed with PowerBuilder 11.X and now in 12.5.

We execute some Oracle Stored Procedures to perform importing data from flat files into our Oracle database.
The procedures run fine, however, we recently discovered that if I execute this procedure multiple times [on different files], we get the following runtime error: Subscript Outside Of Limit.

Further investigation showed that this only happens if we execute a Procedure call more than one time during the PowerBuilder application session. My guess is that some sort of post-execution cleanup needs to be done. I could not find any documentation indicating a need to destroy objects but am hoping that I might be missing something.

I have a copy of the code used to execute the procedure [below].

I appreciate any comments on what might be causing this.

DECLARE PROCESS_MMIS_CH_IMPORT_PROC PROCEDURE FOR
"PUBLIC".MMIS_SRVC_AUTH_AND_CLAIMS_PACK.PROCESS_MMIS_IMPORT_PROC(0, :ls_run_date)

USING SQLCA;

// Execute the Stored Procedure
EXECUTE PROCESS_MMIS_CH_IMPORT_PROC;

IF SQLCA.SQLCode < 0 THEN
ls_error_msg = Left(SQLCA.SQLErrText,200)
ls_msg_prefix += " failed:~r~n~r~n" + ls_error_msg
ELSE
// get the return parameters
// ll_sql_err_cde: SQL number code associated with the most recently raised exception
// ls_sql_err_msg: error message associated the above error SQL error number;
FETCH PROCESS_MMIS_CH_IMPORT_PROC INTO :ll_sql_err_cde, :ls_sql_err_msg;
IF IsNull(ls_sql_err_msg) THEN
ls_msg_prefix += " succeeded! ~r~n"
ELSE
ls_msg_prefix += " failed! ~r~n"
ls_msg_prefix += (" SQL ERR CDE: " + String(ll_sql_err_cde)+ "~r~n")
ls_msg_prefix += (" SQL ERR MSG: " + ls_sql_err_msg)
END IF

END IF

CLOSE PROCESS_MMIS_CH_IMPORT_PROC;

// Display MessageBox with Import Results.
MessageBox(ls_msg_title, ls_msg_prefix, Exclamation!, OK!);


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top