borland Packages Class Hierarchy sql.dataset Package Index
java.lang.Object +----borland.sql.dataset.QueryDescriptor +----borland.sql.dataset.ProcedureDescriptor
Constructors Properties Methods
Implements Serializable
The ProcedureDescriptor class stores property settings associated with a ProcedureDataSet. Its main properties are:
To work with this component programatically, set its properties when instantiating the ProcedureDescriptor object, or individually by its write accessor methods. For properties that do not have corresponding setter methods, use a constructor that takes that property as a parameter.
Through the user-interface, the information stored in the ProcedureDescriptor can be accessed by inspecting the procedure property of a ProcedureDataSet object. This displays the Procedure property editor. The Procedure property editor also provides additional discovery functionality through the Browse Procedures button. Clicking this button displays a dialog listing available stored procedures in the associated database (as specified by the Database property). When you select a stored procedure from this dialog, its contents are pasted into the Stored Procedure Escape or SQL Statement field to be run against the server database.
When you close the procedure property editor, as long as the necessary properties have been specified (the stored procedure escape sequence or SQL statement and the Database object), JBuilder runs the stored procedure against the specified Database object.
You can also explicitly test the stored procedure's properties by clicking the Test Procedure button from within the Procedure property editor. Results of "Success" and "Fail" display in the area beneath the Test Procedure button.
Data can be loaded all in one fetch, as needed, asynchronously or one at a time. When working with asynchronous queries, opening the ProcedureDataSet then immediately calling methods such as rowCount() typically returns a row count lower than expected. To avoid this, either set the stored procedure to run synchronously, listen for the LoadingEvent, perform other actions while the ProcedureDataSet completes loading, or listen for updates to the row count. With asynchronous loading, as the stored procedure fetches rows of data, they are appended to the end of the DataSet. If working with a sorted view of the DataSet, the new rows appear in the specified sort order. Also, be careful to not make assumptions about the current row position since rows are inserted into the sorted view as they are fetched, thereby changing row positions automatically.
For more information on executing stored procedures in JBuilder, see the ProcedureDataSet component. For examples on using a ProcedureDescriptor with the ProcedureDataSet, see Obtaining data through a stored procedure in the Database Application Developer's Guide.
Note: If a stored procedure is run against a synonym on an Oracle server, it is dependent on the support of synonyms in the JDBC driver to determine whether the stored procedure is updatable.
public ProcedureDescriptor(borland.sql.dataset.Database database, java.lang.String query)Constructs a ProcedureDescriptor object with the specified parameters:
Parameters:
public ProcedureDescriptor(borland.sql.dataset.Database database, java.lang.String query, borland.jbcl.dataset.ReadWriteRow parameters, boolean executeOnOpen)Constructs a ProcedureDescriptor object with the specified parameters:
Parameters:
public ProcedureDescriptor(borland.sql.dataset.Database database, java.lang.String query, borland.jbcl.dataset.ReadWriteRow parameters, boolean executeOnOpen, boolean asynchronousExecution)
public ProcedureDescriptor(borland.sql.dataset.Database database, java.lang.String query, borland.jbcl.dataset.ReadWriteRow parameters, boolean executeOnOpen, int loadOption)Constructs a ProcedureDescriptor object with the specified parameters:
Parameters: