INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Question about Oracle Stored Procedure sessions from PB

Question about Oracle Stored Procedure sessions from PB

(OP)
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!);


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close