borland Packages  Class Hierarchy  sql.dataset Package  Index 

ProcedureDataSet component

java.lang.Object
   +----borland.jbcl.dataset.ReadRow
           +----borland.jbcl.dataset.ReadWriteRow
                   +----borland.jbcl.dataset.DataSet
                           +----borland.jbcl.dataset.StorageDataSet
                                   +----borland.sql.dataset.ProcedureDataSet

About the ProcedureDataSet component

Constructors  Properties  Methods  Event Listeners

Implements AccessListener, ColumnDesigner, MasterNavigateListener, StatusListener, Serializable, EventListener

The ProcedureDataSet component is an extension of its superclass (StorageDataSet) and provides functionality to run a stored procedure against data stored in a SQL database, passing in parameters if the procedure expects them. The procedure call is expected to return a cursor, or in the case of an InterBase select procedure, output that can be used to generate a DataSet. This component is recommended for advanced users only.

In any application that uses the ProcedureDataSet, the following components are also required:

The data contained in a ProcedureDataSet is the result of the most recent execution of the stored procedure. Storing the "result set" from the execution of the stored procedure in a ProcedureDataSet allows for greater flexibility in navigation of the resulting data.

The ProcedureDataSet inherits the maxRows property which allows you to set the maximum number of rows stored initially in the ProcedureDataSet as a result of the stored procedure execution.

Once the data is stored in the ProcedureDataSet, you manipulate it and connect it to UI controls in exactly the same way as you would other StorageDataSet components, without regard to which JBCL component is storing the data.

This component is used with servers whose JDBC driver supports executing stored procedures that generate a result set. Not all JDBC drivers support this; some vendor libraries require special API calls to invoke stored procedures. Refer to your server documentation for more information on whether it meets this requirement.

For an example on executing stored procedures in JBuilder, see Obtaining data through a stored procedure in the Database Application Developer's Guide.

Sybase users: Stored procedures on Sybase servers are created in a "Chained" transaction mode. In order to call Sybase stored procedures as part of a ProcedureResolver, the procedures must be modified to run in an unchained transaction mode. Use the Sybase stored system procedure sp_procxmode to change the transaction mode to either "anymore" or "unchained". See your Sybase documentation for additional information.


ProcedureDataSet constructors

ProcedureDataSet properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in borland.jbcl.dataset.DataSet

Properties implemented in borland.jbcl.dataset.ReadRow

Properties implemented in borland.jbcl.dataset.ReadWriteRow

Properties implemented in borland.jbcl.dataset.StorageDataSet

Properties implemented in java.lang.Object

ProcedureDataSet methods

Methods implemented in this class

Methods implemented in borland.jbcl.dataset.DataSet

Methods implemented in borland.jbcl.dataset.ReadWriteRow

Methods implemented in borland.jbcl.dataset.StorageDataSet

Methods implemented in java.lang.Object

ProcedureDataSet event listeners


ProcedureDataSet constructors

ProcedureDataSet()

  public ProcedureDataSet()
Constructs a ProcedureDataSet component.

ProcedureDataSet properties

accumulateResults

 public final boolean isAccumulateResults()
 public final void setAccumulateResults(boolean accumulate)
If true, the provided data is accumulated over consecutive calls to executeQuery. If false, subsequent executeQuery calls overwrite the existing DataSet.

database

 public final Database getDatabase()
Read-only property that returns the Database object associated with this ProcedureDataSet. This property is short cut to the database property of the ProcedureDescriptor object. Set this property using any ProcedureDescriptor constructor that takes a Database object as a parameter.

parameterRow

 public ReadWriteRow getParameterRow()
Read-only property that returns the ReadWriteRow object associated with this ProcedureDataSet. This property is short cut to the parameterRow property of the ProcedureDescriptor object. Set this property using any ProcedureDescriptor constructor that takes a ReadWriteRow object as a parameter.

procedure

 public final ProcedureDescriptor getProcedure()
 public final void setProcedure(borland.sql.dataset.ProcedureDescriptor procedureDescriptor)
The ProcedureDescriptor that stores the properties for this ProcedureDataSet.

provider

 public Provider getProvider()
 public void setProvider(borland.jbcl.dataset.Provider provider)
The provider for this ProcedureDataSet.

queryString

 public final String getQueryString()
Read-only property that returns the query String associated with this ProcedureDataSet. This property is short cut to the queryString property of the ProcedureDescriptor object. Set this property using any ProcedureDescriptor constructor that takes a query string as a parameter.

ProcedureDataSet methods

executeQuery()

  public final void executeQuery()
Executes the procedure with the specified Database and procedure properties, and populates the DataSet.

refresh()

  public void refresh()

Overrides: borland.jbcl.dataset.StorageDataSet.refresh()

refreshSupported()

  public boolean refreshSupported()
Used internally to specify whether refresh() is always supported by the ProcedureDataSet. This method is called, for example, to determine whether to enable the Refresh button on the NavigatorControl.

Overrides: borland.jbcl.dataset.StorageDataSet.refreshSupported()

saveChanges(borland.jbcl.dataset.DataSet)

  public void saveChanges(borland.jbcl.dataset.DataSet dataSet)
Saves changes made to the data. If no resolver has been specified, a QueryResolver is used by default.

Overrides: borland.jbcl.dataset.StorageDataSet.saveChanges(borland.jbcl.dataset.DataSet)

saveChangesSupported()

  public boolean saveChangesSupported()
Used internally to specify whether saveChanges() is always supported by the ProcedureDataSet. This method is called, for example, to determine whether to enable the Save button on the NavigatorControl.

Overrides: borland.jbcl.dataset.StorageDataSet.saveChangesSupported()


ProcedureDataSet event listeners

This component is a source for the following event sets. For information on the JBCL event sets, see Events in JBCL.

access

 public final void addAccessListener(borland.jbcl.dataset.AccessListener listener)
 public final void removeAccessListener(borland.jbcl.dataset.AccessListener listener)

calcAggFields

 public synchronized void addCalcAggFieldsListener(borland.jbcl.dataset.CalcAggFieldsListener listener)
 public synchronized void removeCalcAggFieldsListener(borland.jbcl.dataset.CalcAggFieldsListener listener)

calcFields

 public synchronized void addCalcFieldsListener(borland.jbcl.dataset.CalcFieldsListener listener)
 public synchronized void removeCalcFieldsListener(borland.jbcl.dataset.CalcFieldsListener listener)

dataChange

 public final void addDataChangeListener(borland.jbcl.dataset.DataChangeListener listener)
 public final void removeDataChangeListener(borland.jbcl.dataset.DataChangeListener listener)

edit

 public void addEditListener(borland.jbcl.dataset.EditListener listener)
 public synchronized void removeEditListener(borland.jbcl.dataset.EditListener listener)

load

 public final synchronized void addLoadListener(borland.jbcl.dataset.LoadListener listener)
 public final synchronized void removeLoadListener(borland.jbcl.dataset.LoadListener listener)

masterNavigate

 public final void addMasterNavigateListener(borland.jbcl.dataset.MasterNavigateListener listener)
 public final void removeMasterNavigateListener(borland.jbcl.dataset.MasterNavigateListener listener)

navigation

 public final void addNavigationListener(borland.jbcl.dataset.NavigationListener listener)
 public final void removeNavigationListener(borland.jbcl.dataset.NavigationListener listener)

open

 public final void addOpenListener(borland.jbcl.dataset.OpenListener listener)
 public final void removeOpenListener(borland.jbcl.dataset.OpenListener listener)

rowFilter

 public final void addRowFilterListener(borland.jbcl.dataset.RowFilterListener listener)
 public final void removeRowFilterListener(borland.jbcl.dataset.RowFilterListener listener)

status

 public final void addStatusListener(borland.jbcl.dataset.StatusListener listener)
 public final void removeStatusListener(borland.jbcl.dataset.StatusListener listener)