IDADatasetEx
Overview
The IDADatasetEx interface can be used as source for bookmark control. It also contains methods for getting a dataset state and refreshing.
Location
- Unit: uDAInterfaces.pas
- Ancestry: IDADataset | IDADatasetEx
Active (declared in IDADataset)
Specifies whether the dataset is currently active (open) or not. Setting this property to true will automatically open the dataset, while setting it to false will automatically close it.
property Active: Boolean read write
BookmarkValid safecall
Returns True if bookmarked record exists
function BookmarkValid(Bookmark: TBookmark): Boolean
Parameters:
- Bookmark: bookmark that is checked
Close safecall (declared in IDADataset)
Closes the dataset
procedure Close
ControlsDisabled safecall (declared in IDADataset)
Indicates whether data-aware controls update their display to reflect changes to the dataset.
function ControlsDisabled: Boolean
CurrentRecIdValue (declared in IDADataset)
Returns identificator of current record.
property CurrentRecIdValue: Integer read write
Dataset (declared in IDADataset)
Access to the standard VCL TDataSet
property Dataset: TDataSet read
DisableConstraints safecall (declared in IDADataset)
Disables dataset constraints
procedure DisableConstraints
DisableControls safecall (declared in IDADataset)
Disables data display in data-aware controls associated with the dataset.
procedure DisableControls
DynamicWhere (declared in IDADataset)
Implementation of Dynamic Where.
property DynamicWhere: TDAWhereBuilder read write
EnableConstraints safecall (declared in IDADataset)
Enables dataset constraints
procedure EnableConstraints
EnableControls safecall (declared in IDADataset)
Enables data display in data-aware controls associated with the dataset.
procedure EnableControls
Eof (declared in IDADataset)
Indicates whether reading the dataset has reached the end of the recordset (EOF = End of File). EOF will only turn true if neither an empty dataset was opened or Next was called while the cursor was already on the last record (it will not turn to true when reaching the last record).
property Eof: Boolean read
FieldByName safecall (declared in IDADataset)
Finds a field based on its name. If the specified field does not exist, FieldByName raises an exception.
function FieldByName(const aName: string): TDAField
Parameters:
- aName: name of the searched field
FieldCount (declared in IDADataset)
Indicates the number of fields contained in the dataset.
property FieldCount: Integer read
Fields (declared in IDADataset)
Provides access to all the fields contained in the dataset.
property Fields: TDAFieldCollection read
FieldValues (declared in IDADataset)
Provides convenient access to all the fields values of the current record without having to go though the Fields collection property.
property FieldValues[Index: Integer]: Variant read
FindField safecall (declared in IDADataset)
Returns an item with the specified name.
function FindField(const aName: string): TDAField
Parameters:
- aName: name of the searched field
FreeBookmark safecall
Frees the resources allocated for a specified bookmark.
procedure FreeBookmark(Bookmark: TBookmark)
Parameters:
- Bookmark: bookmark that should be freed
GetBOF safecall
Indicates whether reading the dataset has reached the beginning of the recordset (BOF = Beginning of File). GetBOF will only turn true if neither an empty dataset was opened nor Prior was called while the cursor was on the first record (it will not turn to true automatically when reaching the first record).
function GetBOF: Boolean
GetBookMark safecall
Allocates a bookmark for the active record
function GetBookMark: TBookmark
GetState safecall
Indicates the current operating mode
function GetState: TDatasetState
GotoBookmark safecall
Positions on the record to which a specified bookmark points.
procedure GotoBookmark(Bookmark: TBookmark)
Parameters:
- Bookmark: record identified by this
Bookmark
should be active
IsEmpty (declared in IDADataset)
Indicates whether the dataset contains no records.
property IsEmpty: Boolean read
Locate safecall (declared in IDADataset)
Locates and activates a record by key values.
function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean
Parameters:
- KeyFields: The semicolon-separated list of fields.
- KeyValues: Values specified by the Variant or Variant array.
- Options: Indicates whether the search is case insensitive and whether partial matches are supported.
LogicalName (declared in IDADataset)
Defines the name of the data table.
property LogicalName: string read write
Lookup safecall (declared in IDADataset)
Retrieves the field values from the record that matches the specified search values.
function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant
Parameters:
- KeyFields: the semicolon-separated list of fields
- KeyValues: Values specified by the Variant or Variant array.
- ResultFields: The semicolon-separated list of result fields.
Name (declared in IDADataset)
Returns a human-readable name for the command. For commands obtained through a TDASchema component, this will be the name that the command (or data table) was defined under in Schema Modeler. When obtaining a command from an IDAConnection, the name can be specified in the call to NewCommand or NewDataset.
property Name: string read
Names (declared in IDADataset)
Returns data table's field name specified by Index
property Names[Index: Integer]: string read
Next safecall (declared in IDADataset)
Advances the cursor to the next available record in the dataset. If the current record is the last record available, calling Next will set EOF to indicate the end of the dataset has been reached.
procedure Next
OnAfterOpen (declared in IDADataset)
Fires after dataset was opened
property OnAfterOpen: TDAAfterOpenDatasetEvent read write
delegate: procedure OnAfterOpen(const Sender: IDADataset; ActualSQL: string; ElapsedMilliseconds: Cardinal)
OnBeforeOpen (declared in IDADataset)
Fires before dataset was opened
property OnBeforeOpen: TDABeforeOpenDatasetEvent read write
delegate: procedure OnBeforeOpen(const Sender: IDADataset)
Open safecall (declared in IDADataset)
Opens the dataset and prepares it for fetching records from the database.
procedure Open
ParamByName safecall (declared in IDADataset)
Locates a specific parameter, based on its name. If no matching parameter is defined, an exception will be raised.
function ParamByName(const aName: string): TDAParam
Parameters:
- aName: name of the parameter
Params (declared in IDADataset)
Provides access to the list of parameters defined for the command.
property Params: TDAParamCollection read
RecordCount (declared in IDADataset)
Returns the counf of records
property RecordCount: Integer read
Refresh safecall
Reopens the dataset.
procedure Refresh
RowRecIdValue (declared in IDADataset)
Returns record ID
property RowRecIdValue: Integer read
State
Determines the current operating mode of the dataset. The state property determines which operations can be performed with the data in the dataset, such as editing existing records or inserting new ones. The dataset state constantly changes as the application processes data.
property State: TDatasetState read
Active (declared in IDADataset)
Specifies whether the dataset is currently active (open) or not. Setting this property to true will automatically open the dataset, while setting it to false will automatically close it.
property Active: Boolean read write
CurrentRecIdValue (declared in IDADataset)
Returns identificator of current record.
property CurrentRecIdValue: Integer read write
Dataset (declared in IDADataset)
Access to the standard VCL TDataSet
property Dataset: TDataSet read
DynamicWhere (declared in IDADataset)
Implementation of Dynamic Where.
property DynamicWhere: TDAWhereBuilder read write
Eof (declared in IDADataset)
Indicates whether reading the dataset has reached the end of the recordset (EOF = End of File). EOF will only turn true if neither an empty dataset was opened or Next was called while the cursor was already on the last record (it will not turn to true when reaching the last record).
property Eof: Boolean read
FieldCount (declared in IDADataset)
Indicates the number of fields contained in the dataset.
property FieldCount: Integer read
Fields (declared in IDADataset)
Provides access to all the fields contained in the dataset.
property Fields: TDAFieldCollection read
FieldValues (declared in IDADataset)
Provides convenient access to all the fields values of the current record without having to go though the Fields collection property.
property FieldValues[Index: Integer]: Variant read
IsEmpty (declared in IDADataset)
Indicates whether the dataset contains no records.
property IsEmpty: Boolean read
LogicalName (declared in IDADataset)
Defines the name of the data table.
property LogicalName: string read write
Name (declared in IDADataset)
Returns a human-readable name for the command. For commands obtained through a TDASchema component, this will be the name that the command (or data table) was defined under in Schema Modeler. When obtaining a command from an IDAConnection, the name can be specified in the call to NewCommand or NewDataset.
property Name: string read
Names (declared in IDADataset)
Returns data table's field name specified by Index
property Names[Index: Integer]: string read
Params (declared in IDADataset)
Provides access to the list of parameters defined for the command.
property Params: TDAParamCollection read
RecordCount (declared in IDADataset)
Returns the counf of records
property RecordCount: Integer read
RowRecIdValue (declared in IDADataset)
Returns record ID
property RowRecIdValue: Integer read
State
Determines the current operating mode of the dataset. The state property determines which operations can be performed with the data in the dataset, such as editing existing records or inserting new ones. The dataset state constantly changes as the application processes data.
property State: TDatasetState read
BookmarkValid safecall
Returns True if bookmarked record exists
function BookmarkValid(Bookmark: TBookmark): Boolean
Parameters:
- Bookmark: bookmark that is checked
Close safecall (declared in IDADataset)
Closes the dataset
procedure Close
ControlsDisabled safecall (declared in IDADataset)
Indicates whether data-aware controls update their display to reflect changes to the dataset.
function ControlsDisabled: Boolean
DisableConstraints safecall (declared in IDADataset)
Disables dataset constraints
procedure DisableConstraints
DisableControls safecall (declared in IDADataset)
Disables data display in data-aware controls associated with the dataset.
procedure DisableControls
EnableConstraints safecall (declared in IDADataset)
Enables dataset constraints
procedure EnableConstraints
EnableControls safecall (declared in IDADataset)
Enables data display in data-aware controls associated with the dataset.
procedure EnableControls
FieldByName safecall (declared in IDADataset)
Finds a field based on its name. If the specified field does not exist, FieldByName raises an exception.
function FieldByName(const aName: string): TDAField
Parameters:
- aName: name of the searched field
FindField safecall (declared in IDADataset)
Returns an item with the specified name.
function FindField(const aName: string): TDAField
Parameters:
- aName: name of the searched field
FreeBookmark safecall
Frees the resources allocated for a specified bookmark.
procedure FreeBookmark(Bookmark: TBookmark)
Parameters:
- Bookmark: bookmark that should be freed
GetBOF safecall
Indicates whether reading the dataset has reached the beginning of the recordset (BOF = Beginning of File). GetBOF will only turn true if neither an empty dataset was opened nor Prior was called while the cursor was on the first record (it will not turn to true automatically when reaching the first record).
function GetBOF: Boolean
GetBookMark safecall
Allocates a bookmark for the active record
function GetBookMark: TBookmark
GetState safecall
Indicates the current operating mode
function GetState: TDatasetState
GotoBookmark safecall
Positions on the record to which a specified bookmark points.
procedure GotoBookmark(Bookmark: TBookmark)
Parameters:
- Bookmark: record identified by this
Bookmark
should be active
Locate safecall (declared in IDADataset)
Locates and activates a record by key values.
function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean
Parameters:
- KeyFields: The semicolon-separated list of fields.
- KeyValues: Values specified by the Variant or Variant array.
- Options: Indicates whether the search is case insensitive and whether partial matches are supported.
Lookup safecall (declared in IDADataset)
Retrieves the field values from the record that matches the specified search values.
function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant
Parameters:
- KeyFields: the semicolon-separated list of fields
- KeyValues: Values specified by the Variant or Variant array.
- ResultFields: The semicolon-separated list of result fields.
Next safecall (declared in IDADataset)
Advances the cursor to the next available record in the dataset. If the current record is the last record available, calling Next will set EOF to indicate the end of the dataset has been reached.
procedure Next
Open safecall (declared in IDADataset)
Opens the dataset and prepares it for fetching records from the database.
procedure Open
ParamByName safecall (declared in IDADataset)
Locates a specific parameter, based on its name. If no matching parameter is defined, an exception will be raised.
function ParamByName(const aName: string): TDAParam
Parameters:
- aName: name of the parameter
Refresh safecall
Reopens the dataset.
procedure Refresh
OnAfterOpen (declared in IDADataset)
Fires after dataset was opened
property OnAfterOpen: TDAAfterOpenDatasetEvent read write
delegate: procedure OnAfterOpen(const Sender: IDADataset; ActualSQL: string; ElapsedMilliseconds: Cardinal)
OnBeforeOpen (declared in IDADataset)
Fires before dataset was opened
property OnBeforeOpen: TDABeforeOpenDatasetEvent read write
delegate: procedure OnBeforeOpen(const Sender: IDADataset)