| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Need example of Oracle RPC calls from Powerbuilder
Joe Whalley wrote:
> I am having no luck trying to use the DBMS_ALERT package that uses
> oracle RPCs. I can activate and receive them fine in SQLPlus, but my
> call to DBMS_ALERT.waitone never returns anything in powerbuilder. I
> know I'm connected to the instance, as datawindows return good info.
> I've called the register RPC, then the waitone. Would appreciate any
> examples of using Oracle RPCS.
>
> Joe
Joe, I have had success with the following code:
This is how I declare in the transaction object: subroutine RR_ALERT_WAITONE(string ALERT_NAME,ref string OUT_MESSAGE,ref integer STATUS) RPCFUNC ALIAS FOR "CCDBO.RR_ALERT_WAITONE" subroutine RR_ALERT_REMOVE(string ALERT_NAME) RPCFUNC ALIAS FOR "CCDBO.RR_ALERT_REMOVE"
subroutine RR_ALERT_SIGNAL(string ALERT_NAME,string MESSAGE) RPCFUNC ALIAS FOR "CCDBO.RR_ALERT_SIGNAL" subroutine RR_ALERT_REGISTER(string MESSAGE) RPCFUNC ALIAS FOR"CCDBO.RR_ALERT_REGISTER" This is the code to send:
// Send the signal
SQLCA.RR_ALERT_SIGNAL('rr_register',sle_send_msg.text)
This is the code to receive:
// Pad the return buffer
ls_msg = fill(' ',1800)
// Check for any messages
SQLCA.RR_ALERT_WAITONE('rr_register',ls_msg,li_status)
// If a message has been received
// display the returned values
IF li_status = 0 THEN
sle_ret_msg.text = ls_msg
sle_status.text = String(li_status)
// Remove the alert
SQLCA.RR_ALERT_REMOVE('rr_register')
ELSE
sle_ret_msg.text = ''
sle_status.text = String(li_status)
END IF
Make sure you have set your alias as the owner of the package and make
sure that you pad
![]() |
![]() |