This is a feature of JBuilder Professional and Enterprise.
Use the Procedure
property editor to set properties associated with a ProcedureDataSet
or a ProcedureProvider
component. With an associated Database
component, they allow execution of a stored procedure.
To display this property editor, choose the procedure
property from the Inspector when a ProcedureDataSet
component is selected in the structure pane. The property values referenced in this dialog are stored in the ProcedureDescriptor
object.
This property editor contains two pages:
For more information on stored procedures, see the About section for the ProcedureDataSet
component in the DataExpress Component Reference
. For a tutorial on accessing data using stored procedures, see the Obtaining data through a stored procedure topic in Database Application Developer's Guide
.
Use the Procedure page to set procedure properties and associate the procedure with a particular Database
. The properties referenced on this page of the property editor are stored in the ProcedureDescriptor
object.
Displays the names of all instantiated Database
objects to which this ProcedureDataSet
can be bound. This property must be set for the stored procedure to run.
Selecting a Database object enables the Browse Procedures button.
Displays the Available Procedures dialog which allows you to browse the database for existing procedures. The Available Procedures dialog displays a list box with available procedure names, and a Paste Procedure button. Click the paste button to paste the procedure into the Stored Procedure Escape or SQL Statement field of this property editor.
This button is dimmed and unavailable while the Database field displays the value "<none>". Select a database object in the Database field to enable this button.
Enter either of the following in this field:
{call PROCEDURENAME [(?,?,?,...)] } for procedures
{?= call FUNCTIONNAME[(?,?,?,...)] } for functions
Where the square brackets denote that the parameter list is optional.
execute procedure PROCEDURENAME ?,?,?
In both, the parameter markers (the "?" signs) may be replaced with named parameters of the form :ParameterName.
Determines whether the stored procedure executes automatically when the ProcedureDataSet
is opened. This option defaults to checked, which allows live data to display in the UI Designer when the ProcedureDataSet
is bound to a data-aware control. This option displays only when accessing this dialog through the procedure
property of ProcedureDataSet
or ProcedureProvider
components.
Select this option to move the SQL statement to a ResourceBundle file. If this option is selected and you close this dialog using the OK button, the Create ResourceBundle dialog box displays to prompt you for the name of the Resource Bundle.
Specifies how the data is loaded into the ProcedureDataSet. The data can be loaded:
JdbTable
component.For more information on these options, see the com.borland.dx.sql.dataset.Load
.
Tests the value of the Stored Procedure Escape or SQL Statement field and other properties on this dialog against the specified Database
. The result ("Success" or "Fail") is displayed below the Test Procedure button. This button displays only when accessing this dialog through the procedure
property of ProcedureDataSet
or ProcedureProvider
components.
Use the Parameters page to specify parameters for your procedure statement.
Parameter values are specified through an instantiated ReadWriteRow
object (or an instance of any of its subclasses), for example, a DataSet
object. Any ReadWriteRow
, such as ParameterRow
, DataSet
, and DataRow
may be used as query or procedure parameters. In a ParameterRow
, columns can simply be set up with the addColumns
and setColumns
methods. DataSet
and DataRow
should only be used if they already contain the columns with the wanted data.
Select the ReadWriteRow
object (or the ReadWriteRow
subclass) that contains the values for your procedure parameters from the drop-down list.