public class DhDataSource
Represents a generic wrapper class for data sources. It allows access to any object that is a data source, regardless of the tag type. This class also encapsulates access to the Data Source object ADO recordset functions.
Constructors
Name | Description |
---|---|
DhDataSource( DhElement e ) | Creates a DhDataSource object. |
Methods
Name | Description |
---|---|
addNew() | Creates a new record for the recordset. |
addOnDataAvailable( DhEventHandler h ) | Adds an event handler for the DataAvailable event. |
addOnDataSetChanged( DhEventHandler h ) | Adds an event handler for the DataSetChanged event. |
addOnDataSetComplete( DhEventHandler h ) | Adds an event handler for the DataSetComplete event. |
cancelUpdate() | Cancels the current update operation, and restores recordset to its prior state. |
delete() | Deletes the current record from the recordset. |
getAbsolutePosition( ) | Retrieves the ordinal position of the current record in the recordset. |
getBOF() | Determines if the current record is before the first record. |
getDataFieldIndex( String strFieldName ) | Returns the ordinal column number of the column specified. |
getDataFieldName( int nField ) | Returns the string name of the recordset field at the specified ordinal position. |
getEditMode() | Retrieves the current edit mode. |
getEOF() | Determines if the current record is after the last record. |
getFieldUpdatable( int nField ) | Determines if the specified field is writeable. |
getFieldUpdatable( String strField ) | Determines if the specified field is writeable. |
getID() | Retrieves the identifier for the element associated with this data source. |
getRecordCount() | Returns the number of records in the recordset. |
getRecordsetPeer() | Returns the ADO recordset object represented by the data source object. |
move( int nRecords ) | Moves the recordset a specified number of records. |
moveFirst() | Moves to the first record in the recordset. |
moveLast() | Moves to the last record in the recordset. |
moveNext() | Moves to the next record in the recordset. |
movePrevious() | Moves to the previous record in the recordset. |
refresh() | Refreshes the recordset by reissuing the query that created it. |
setAbsolutePosition( int nPos ) | Sets the internal recordset to an ordinal record position. |
setDataSourceFromElement( DhElement e ) | Sets the element this DhDataSource represents. |
update() | Commits an in-progress edit operation. |
Creates a DhDataSource object. This constructor wraps an existing element that is a data source.
Returns true if successful; otherwise, returns false.
Creates a new record for the recordset. The record will not be added until update() is called.
Adds an event handler for the DataAvailable event.
Adds an event handler for the DataSetChanged event.
Adds an event handler for the DataSetComplete event.
Returns true if successful; otherwise, returns false.
Cancels the current update operation, and restores recordset to its prior state.
Returns true successful; otherwise, returns false.
Deletes the current record from the recordset.
Returns the zero-based position of the record, or returns -1 if the ordinal position cannot be determined.
Retrieves the ordinal position of the current record in the recordset.
Returns true if at the first record; otherwise, returns false.
Determines if the current record is before the first record.
Returns the zero-based ordinal position of column in recordset.
Returns the ordinal column number of the column specified.
Returns the name of the field, or returns a null string if it is unavailable.
Returns the string name of the recordset field at the specified ordinal position.
Returns the current edit mode, which can be one of the following:
Retrieves the current edit mode.
Returns true if at the last record; otherwise, returns false.
Determines if the current record is after the last record.
Returns true if a write operation is allowed, returns false if not.
Determines if the specified field is writeable.
Returns true if a write operation is allowed, returns false if not.
Determines if the specified field is writeable.
Returns the identifier of the associated element.
Retrieves the identifier for the element associated with this data source.
Returns 0 or greater if successful; otherwise, returns -1.
Returns the number of records in the recordset. This number is often an estimate, and relies on the underlying recordset.
Returns an ADO recordset object, or returns null if that interface cannot be obtained.
Returns the ADO recordset object represented by the data source object. Not all data source objects expose a recordset object (for example, the Tabular Data Control does not).
Returns true successful; otherwise, returns false.
Moves the recordset a specified number of records.
Returns true if successful; otherwise, returns false.
Moves to the first record in the recordset.
Returns true successful; otherwise, returns false.
Moves to the last record in the recordset.
Returns true if successful; otherwise, returns false.
Moves to the next record in the recordset.
Returns true if successful; otherwise, returns false.
Moves to the previous record in the recordset.
Returns true successful; otherwise, returns false.
Refreshes the recordset by reissuing the query that created it.
Returns true if successful; otherwise, returns false.
Sets the internal recordset to an ordinal record position.
Sets the element this DhDataSource represents.
Returns true if the update was successful; otherwise, returns false.
Commits an in-progress edit operation.