Add User-Defined Methods That
Are Stored Procedure Calls
After specifying that you want to add or modify
a user-defined method which is stored procedure call (see Add User-Defined Methods or Modify
User-Defined Methods on how to do
this), you perform the following steps in the Stored Procedure
Call notebook:
- Enter a name for the method in the Method
Name entry field.
- On the Stored Procedure page, click the
drop-down list to view all the stored procedures defined
for the database in the Data Access Builder session and
select the name of the stored procedure that you want to
work with.
If you do not find the
stored procedure in the list, you have to define the stored
procedure first and then the
stored procedure will show up in the Stored
Procedure Name list box.
- Enter a Display Name for
the method. This name can contain double-byte characters
and is used instead of the Method Name
by builders such as the Visual Builder. By default, this
is the same as Method Name.
- On the Parameter page, map the parameters
to parts of the C++ method and to C++ types by doing the
following steps for each parameter:
- Select the parameter in from the
Parameters list box.
- Select a radio button to specify
the part of the C++ method that the parameter
will be Mapped To. Depending on
the parameter type (from the stored procedure
definition), some of these radio buttons will be
enabled and some will be disabled. Choose one of
the following settings:
- Parameter -
Maps the stored procedure parameter to a
parameter in the C++ method (it will
appear in the method signature).
- Attribute
- Maps the stored procedure parameter to
an attribute in the mapping. Input values
for the method will be taken from the
specified attribute in the current <class> object, and output values (if
any) will be assigned to the specified
attribute in the current <class> object.
- Return Value
- Maps the stored procedure parameter to
a return value of the C++ method (it will
be assigned to the variable on the
left-hand side of an assignment call).
This option is enabled only for output
parameters and stored procedure return
value parameters.
- None -
Leaves the stored procedure parameter out
of the method mapping. This option is
disabled for input parameters.
- According to which of the
following options you choose, fields to the
right-hand side of the radio button option will
be enabled for you to complete, as follows:
- If you choose Parameter,
fill in a Name for the
parameter, and select a Type from
the drop-down list of appropriate types
(one is already selected by default).
- If you choose Attribute,
select a Name from the
drop-down list of appropriate <class>
attributes.
- If you choose Return
Value, select a Type
from the drop-down list of appropriate
types (one is already selected by
default).
- There is nothing further
to specify if you choose None.
- Click the Modify
button and move on to the next parameter.
- Enter a comment for the method on the
Comment Page. This comment will be added to the generated
code for the stored procedure call method.
- Click OK to close the
notebook and the method is added to the method's
container in the Methods or Manager Methods window.

User-Defined
Methods
Background
Threads

Display the List of
Defined Stored Procedures
Modify User-Defined
Methods
Copy User-Defined
Methods
Delete User-Defined
Methods

Sample:
Create and Use a Stored Procedure Call on a Persistent Object