Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Oracle DECLARE and EXECUTE – PB Docs 2021 – PowerBuilder Library

Oracle DECLARE and EXECUTE – PB Docs 2021

Oracle
DECLARE and EXECUTE

PowerBuilder requires a declarative statement to identify the
database stored procedure that is being used and a logical name that can
be referenced in subsequent SQL statements. The general syntax for
declaring a procedure is:

where logical_procedure_name can be any valid PowerScript data
identifier and Oracle_procedure_name is the name of the stored procedure
in the database.

The parameter references can take the form of any valid parameter
string that Oracle accepts. PowerBuilder does not inspect the parameter
list format except for purposes of variable substitution. The USING clause
is required only if you are using a transaction object other than the
default transaction object.

You can use Oracle Named or Positional notation to specify the
procedure arguments. Positional is simpler to specify, but you must use
Named if any output parameters are defined to the left of any input
parameters.

Example 1

If a stored procedure is defined as:

To declare that procedure for processing within PowerBuilder, you
code:

Note that this declaration is a non-executable statement, just like
a cursor declaration. Where cursors have an OPEN statement, procedures
have an EXECUTE statement.

When the EXECUTE statement executes, the procedure is invoked. The
EXECUTE refers to the logical procedure name.

Example 2

The following example that declares a function in a service object
that reads a pipe shows the use of named notation:

Example 3

Given this procedure:

The DECLARE statement must use named notation because output
parameters are defined to the left of input parameters:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x