borland Packages  Class Hierarchy  dx.dataset Package 

ParameterRow component

java.lang.Object
   +----com.borland.dx.dataset.ReadRow
           +----com.borland.dx.dataset.ReadWriteRow
                   +----com.borland.dx.dataset.ParameterRow

About the ParameterRow component

Constructors  Properties  Methods  

Implements ColumnDesigner, Designable, Serializable

The ParameterRow component is useful when working with parameter values for SQL statements of QueryDataSet and ProcedureDataSet components. To use this component in your application

  1. instantiate a ParameterRow
  2. add Column components
  3. set any Column properties you need
  4. set the parameterRow property of the QueryDataSet or ProcedureDataSet to this ParameterRow

Parameters can also be specified using a "scoped" DataRow that contains only some of the Columns in the associated DataSet. However, the Column components in the DataRow map directly to the Columns in the DataSet, and therefore do not allow more than once reference in the DataRow. The ParameterRow component allows you to specify the same column multiple times, for example, for range comparisons.

For example, you may want to specify query parameters which involve two or more range comparisons against the same Column. For the following query statement:

SELECT * FROM employee WHERE emp_no>=:LOW AND emp_no<=:HIGH
your ParameterRow should have a Column for each of its parameter names, :LOW and :HIGH. Place values you want the query to use in these Columns and associate them to the query (set the parameterRow property of the QueryDataSet or ProcedureDataSet to this ParameterRow. In this way, whenever you execute your query, you can use different values for :LOW and :HIGH without having to write multiple queries for each permutation.

ParameterRow constructors

ParameterRow properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in com.borland.dx.dataset.ReadRow

Properties implemented in com.borland.dx.dataset.ReadWriteRow

Properties implemented in java.lang.Object

ParameterRow methods

Methods implemented in this class

Methods implemented in com.borland.dx.dataset.ReadRow

Methods implemented in com.borland.dx.dataset.ReadWriteRow

Methods implemented in java.lang.Object


ParameterRow variables


ParameterRow constructors

ParameterRow()

  public ParameterRow()
Default constructor that creates a ParameterRow component.

ParameterRow properties

columns

 public Column[] getColumns()
 public void setColumns(Column[] columns)
Stores the Column components as a String array of Column names.

ParameterRow methods

addColumn(com.borland.dx.dataset.Column, int)

  public int addColumn(Column column, int parameterType)
Adds the specified Column to the ParameterRow, sets its parameterType as specified, then returns the ordinal position of the newly added Column. This method is a shortcut for setting the parameterType property on a Column and then calling the addColumn(Column) method. On error this method throws a DataSetException.

Parameters:

column
The Column component to add to this ParameterRow.
parameterType
The usage type of the parameter. Valid values are defined in ParameterType variables.

addColumn(java.lang.String, int)

  public void addColumn(String columnName, int dataType)
Adds a Column to the ParameterRow, sets its columnName as specified, and its dataType to ParameterType.IN. This method is useful for parameterized queries and is a short-cut to calling other addColumn(...) methods then setting the parameterType to ParameterType.IN. On error, this method throws a DataSetException.

Parameters:

columnName
The Column component (specified by its String name) to add to this ParameterRow.
dataType
The data type of the parameter. Valid values are data type constants defined in com.borland.dx.dataset.Variant variables.

addColumn(java.lang.String, int, int)

  public void addColumn(String columnName, int dataType, int parameterType)
Adds a Column to the ParameterRow, then sets its columnName, dataType, and parameterType properties as specified by its parameters. On error, this method throws a DataSetException.

Parameters:

columnName
The Column component (specified by its String name) to add to this ParameterRow.
dataType
The data type of the parameter. Valid values are data type constants defined in com.borland.dx.dataset.Variant variables.
parameterType
The usage type of the parameter. Valid values are defined in ParameterType variables.