IDADataset

Overview

The IDADataset interface is used as source for data retrieval on client-side.

For server-side, see IDAServerDataset.

Location

Implemented in

 

Active

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

Close  safecall

Closes the dataset

procedure Close

ControlsDisabled  safecall

Indicates whether data-aware controls update their display to reflect changes to the dataset.

function ControlsDisabled: Boolean

CurrentRecIdValue

Returns identificator of current record.

property CurrentRecIdValue: integer read write

Dataset

Access to the standard VCL TDataSet

property Dataset: TDataSet read write

DisableConstraints  safecall

Disables dataset constraints

procedure DisableConstraints

DisableControls  safecall

Disables data display in data-aware controls associated with the dataset.

procedure DisableControls

DynamicWhere

Implementation of Dynamic Where.

property DynamicWhere: TDAWhereBuilder read write

EnableConstraints  safecall

Enables dataset constraints

procedure EnableConstraints

EnableControls  safecall

Enables data display in data-aware controls associated with the dataset.

procedure EnableControls

Eof

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 write

FieldByName  safecall

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

Indicates the number of fields contained in the dataset.

property FieldCount: integer read write

Fields

Provides access to all the fields contained in the dataset.

property Fields: TDAFieldCollection read write

FieldValues

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 write

FindField  safecall

Returns an item with the specified name.

function FindField(const aName: string): TDAField

Parameters:

  • aName: name of the searched field

IsEmpty

Indicates whether the dataset contains no records.

property IsEmpty: Boolean read write

Locate  safecall

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

Defines the name of the data table.

property LogicalName: string read write

Lookup  safecall

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

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 write

Names

Returns data table's field name specified by Index

property Names[Index: integer]: string read write

Next  safecall

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

Fires after dataset was opened

property OnAfterOpen: TDAAfterOpenDatasetEvent read write
delegate: procedure OnAfterOpen(const Sender: IDADataset; ActualSQL: string; ElapsedMilliseconds: Cardinal)

OnBeforeOpen

Fires before dataset was opened

property OnBeforeOpen: TDABeforeOpenDatasetEvent read write
delegate: procedure OnBeforeOpen(const Sender: IDADataset)

Open  safecall

Opens the dataset and prepares it for fetching records from the database.

procedure Open

ParamByName  safecall

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

Provides access to the list of parameters defined for the command.

property Params: TDAParamCollection read write

RecordCount

Returns the counf of records

property RecordCount: integer read write

RowRecIdValue

Returns record ID

property RowRecIdValue: integer read write

 

Active

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

Returns identificator of current record.

property CurrentRecIdValue: integer read write

Dataset

Access to the standard VCL TDataSet

property Dataset: TDataSet read write

DynamicWhere

Implementation of Dynamic Where.

property DynamicWhere: TDAWhereBuilder read write

Eof

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 write

FieldCount

Indicates the number of fields contained in the dataset.

property FieldCount: integer read write

Fields

Provides access to all the fields contained in the dataset.

property Fields: TDAFieldCollection read write

FieldValues

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 write

IsEmpty

Indicates whether the dataset contains no records.

property IsEmpty: Boolean read write

LogicalName

Defines the name of the data table.

property LogicalName: string read write

Name

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 write

Names

Returns data table's field name specified by Index

property Names[Index: integer]: string read write

Params

Provides access to the list of parameters defined for the command.

property Params: TDAParamCollection read write

RecordCount

Returns the counf of records

property RecordCount: integer read write

RowRecIdValue

Returns record ID

property RowRecIdValue: integer read write

 

Close  safecall

Closes the dataset

procedure Close

ControlsDisabled  safecall

Indicates whether data-aware controls update their display to reflect changes to the dataset.

function ControlsDisabled: Boolean

DisableConstraints  safecall

Disables dataset constraints

procedure DisableConstraints

DisableControls  safecall

Disables data display in data-aware controls associated with the dataset.

procedure DisableControls

EnableConstraints  safecall

Enables dataset constraints

procedure EnableConstraints

EnableControls  safecall

Enables data display in data-aware controls associated with the dataset.

procedure EnableControls

FieldByName  safecall

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

Returns an item with the specified name.

function FindField(const aName: string): TDAField

Parameters:

  • aName: name of the searched field

Locate  safecall

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

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

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

Opens the dataset and prepares it for fetching records from the database.

procedure Open

ParamByName  safecall

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

 

OnAfterOpen

Fires after dataset was opened

property OnAfterOpen: TDAAfterOpenDatasetEvent read write
delegate: procedure OnAfterOpen(const Sender: IDADataset; ActualSQL: string; ElapsedMilliseconds: Cardinal)

OnBeforeOpen

Fires before dataset was opened

property OnBeforeOpen: TDABeforeOpenDatasetEvent read write
delegate: procedure OnBeforeOpen(const Sender: IDADataset)

Descendants

See Also