IDAStronglyTypedDataTable

Overview

The IDAStronglyTypedDataTable base interface provides a set of methods for working with custom strongly typed datatables.

The IDAStronglyTypedDataTable interface is implemented by the TDADataTableRules (provide datatable rules) and TDABusinessProcessorRules classes, which provide processor business rules).

You do not need to use this interface directly, but use the descendants of this class after creating the specified strongly typed datatables.

Location


 

Active

Determines if the specified strongly typed datatable is active (value true) or not (value false).

property Active: Boolean read write

Append

Adds a new empty record to the end of the current strongly typed datatable.

procedure Append

BOF

Indicates whether a strongly typed datatable is positioned at the first record. This property equals true if the active record in the strongly typed datatable is the first record, otherwise it equals false.

property BOF: Boolean read

Cancel

Cancels changes of the active record if these changes are not yet posted.

procedure Cancel

ClearField

Clears the specified strongly typed datatable field.

procedure ClearField(const FieldIndexOrName: Variant)

Parameters:

  • FieldIndexOrName: Input index or field name that will be cleared.

Close

Closes the current strongly typed datatable.

procedure Close

DataTable

Represents the datatable that is related with the current strongly typed datatable. This property is read-only.

property DataTable: TDADataTable read

Delete

Deletes the current active record and sets the next record as active record in the current strongly typed datatable.

procedure Delete

DetailOptions

Represents the options that are related with the current detail table (for master/detail datatables). This property can have the following values: dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates or dtIncludeInAllInOneFetch.

property DetailOptions: TDADetailOptions read write

Edit

Enables the editing of data in the current strongly typed datatable.

procedure Edit

Eof

Indicates whether a strongly typed datatable (Delphi) is positioned at the last record. This property equals true if the active record in the strongly typed datatable is the last record, otherwise it equals false.

property Eof: Boolean read

First

Sets the first record as active record in the current strongly typed datatable.

procedure First

GetActive

Determines if the specified strongly typed datatable is active (value true) or not (value false).

function GetActive: Boolean

GetBOF

Indicates whether a strongly typed datatable is positioned at the first record. The result equals true if the active record in the strongly typed datatable is the first record, otherwise it equals false.

function GetBOF: Boolean

GetDataTable

Represents the datatable that is related with the current strongly typed datatable.

function GetDataTable: TDADataTable

GetDetailOptions

Represents the options that are related with the current detail table (for master/detail datatables). The result can have the following values: dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates or dtIncludeInAllInOneFetch.

function GetDetailOptions: TDADetailOptions

GetEOF

Indicates whether a strongly typed datatable is positioned at the last record. The result equals true if the active record in the strongly typed datatable is the last record, otherwise it equals false.

function GetEOF: Boolean

GetIsEmpty

Determines if the current strongly typed datatable is empty (value true) or not (value false).

function GetIsEmpty: Boolean

GetMasterOptions

Represents the options that are related with the current detail table (for master/detail datatables). The result can have the following values: dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates or dtIncludeInAllInOneFetch.

function GetMasterOptions: TDAMasterOptions

GetRecordCount

Represents the record count in the current strongly typed datatable.

function GetRecordCount: Integer

Insert

Inserts a new empty record into the current strongly typed datatable.

procedure Insert

IsEmpty

Determines whether the current strongly typed datatable is empty (value true) or not (value false). This property is read-only.

property IsEmpty: Boolean read

IsFieldNull

Returns true if the specified record is not assigned, otherwise returns false.

function IsFieldNull(const FieldIndexOrName: Variant): Boolean

Parameters:

  • FieldIndexOrName: Input index or field name

Last

Sets the last record as active record in the current strongly typed datatable.

procedure Last

Locate

Searches a dataset for a specified record, makes it the active record and returns true if a record is found that matches the specified criteria and that record is now active, otherwise returns false.

function Locate(const aKeyFields: string; const aKeyValues: Variant; aOptions: TLocateOptions): Boolean

Parameters:

  • aKeyFields: Input field or fields that should be matched in the dataset when doing a locate.
  • aKeyValues: Input field values that should be matched in the dataset when doing a locate.
  • aOptions: Options that are used during locating. Can have the following values: loCaseInsensitive or loPartialKey. By default, the value is empty.

Lookup

Retrieves field values from the record that matches specified search values and returns a variant or a variant array that contains the value or values of the fields specified by the comma-delimited string ResultFields on the specified record.

function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant

Parameters:

  • KeyFields: Input field or fields that should be matched in the dataset when doing a lookup.
  • KeyValues: Input field values that should be matched in the dataset when doing a lookup.
  • ResultFields: Result field collection that will include the output result set.

MasterOptions

Represents the options that are related with the current master table (for master/detail datatables). This property can have the following values: moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates or moAllInOneFetch.

property MasterOptions: TDAMasterOptions read write

Moves the next record in the current strongly typed datatable.

procedure Next

Open

Opens the strongly typed datatable and prepares it for fetching records from the database. If the datatable is not empty, the cursor will be placed on the first available record; otherwise, EOF will be set to true to indicate that the end of the (empty) record set has been reached.

procedure Open

Post

Posts modified records to the related database.

procedure Post

Prior

Moves to the previous record in the strongly typed datatable.

procedure Prior

RecNo

Represents the number of active records in the current strongly typed datatable.

property RecNo: Integer read write

RecordCount

Represents the record count in the current strongly typed datatable. This property is read-only.

property RecordCount: Integer read

SetActive

Sets the new state of the strongly typed datatable: true if the datatable is active, false if the datatable is not active.

procedure SetActive(const Value: Boolean)

Parameters:


SetDetailOptions

Sets the options that are related with the current detail table (for master/detail datatables). The parameter Value can have the following values: dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates or dtIncludeInAllInOneFetch.

procedure SetDetailOptions(Value: TDADetailOptions)

Parameters:

  • Value: Specified input options

SetMasterOptions

Sets the options that are related with the current master table (for master/detail datatables). The parameter Value can have the following values: moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates or moAllInOneFetch.

procedure SetMasterOptions(Value: TDAMasterOptions)

Parameters:

  • Value: Specified input options

State

Represents the state of the current strongly typed datatable. This property can have the following values: dsInactive, dsBrowse, dsEdit, dsInsert, dsSetKey, dsCalcFields, dsFilter, dsNewValue, dsOldValue, dsCurValue, dsBlockRead, dsInternalCalc or dsOpening. This property is read-only.

property State: TDatasetState read

 

Active

Determines if the specified strongly typed datatable is active (value true) or not (value false).

property Active: Boolean read write

BOF

Indicates whether a strongly typed datatable is positioned at the first record. This property equals true if the active record in the strongly typed datatable is the first record, otherwise it equals false.

property BOF: Boolean read

DataTable

Represents the datatable that is related with the current strongly typed datatable. This property is read-only.

property DataTable: TDADataTable read

DetailOptions

Represents the options that are related with the current detail table (for master/detail datatables). This property can have the following values: dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates or dtIncludeInAllInOneFetch.

property DetailOptions: TDADetailOptions read write

Eof

Indicates whether a strongly typed datatable (Delphi) is positioned at the last record. This property equals true if the active record in the strongly typed datatable is the last record, otherwise it equals false.

property Eof: Boolean read

IsEmpty

Determines whether the current strongly typed datatable is empty (value true) or not (value false). This property is read-only.

property IsEmpty: Boolean read

MasterOptions

Represents the options that are related with the current master table (for master/detail datatables). This property can have the following values: moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates or moAllInOneFetch.

property MasterOptions: TDAMasterOptions read write

RecNo

Represents the number of active records in the current strongly typed datatable.

property RecNo: Integer read write

RecordCount

Represents the record count in the current strongly typed datatable. This property is read-only.

property RecordCount: Integer read

State

Represents the state of the current strongly typed datatable. This property can have the following values: dsInactive, dsBrowse, dsEdit, dsInsert, dsSetKey, dsCalcFields, dsFilter, dsNewValue, dsOldValue, dsCurValue, dsBlockRead, dsInternalCalc or dsOpening. This property is read-only.

property State: TDatasetState read

 

Append

Adds a new empty record to the end of the current strongly typed datatable.

procedure Append

Cancel

Cancels changes of the active record if these changes are not yet posted.

procedure Cancel

ClearField

Clears the specified strongly typed datatable field.

procedure ClearField(const FieldIndexOrName: Variant)

Parameters:

  • FieldIndexOrName: Input index or field name that will be cleared.

Close

Closes the current strongly typed datatable.

procedure Close

Delete

Deletes the current active record and sets the next record as active record in the current strongly typed datatable.

procedure Delete

Edit

Enables the editing of data in the current strongly typed datatable.

procedure Edit

First

Sets the first record as active record in the current strongly typed datatable.

procedure First

GetActive

Determines if the specified strongly typed datatable is active (value true) or not (value false).

function GetActive: Boolean

GetBOF

Indicates whether a strongly typed datatable is positioned at the first record. The result equals true if the active record in the strongly typed datatable is the first record, otherwise it equals false.

function GetBOF: Boolean

GetDataTable

Represents the datatable that is related with the current strongly typed datatable.

function GetDataTable: TDADataTable

GetDetailOptions

Represents the options that are related with the current detail table (for master/detail datatables). The result can have the following values: dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates or dtIncludeInAllInOneFetch.

function GetDetailOptions: TDADetailOptions

GetEOF

Indicates whether a strongly typed datatable is positioned at the last record. The result equals true if the active record in the strongly typed datatable is the last record, otherwise it equals false.

function GetEOF: Boolean

GetIsEmpty

Determines if the current strongly typed datatable is empty (value true) or not (value false).

function GetIsEmpty: Boolean

GetMasterOptions

Represents the options that are related with the current detail table (for master/detail datatables). The result can have the following values: dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates or dtIncludeInAllInOneFetch.

function GetMasterOptions: TDAMasterOptions

GetRecordCount

Represents the record count in the current strongly typed datatable.

function GetRecordCount: Integer

Insert

Inserts a new empty record into the current strongly typed datatable.

procedure Insert

IsFieldNull

Returns true if the specified record is not assigned, otherwise returns false.

function IsFieldNull(const FieldIndexOrName: Variant): Boolean

Parameters:

  • FieldIndexOrName: Input index or field name

Last

Sets the last record as active record in the current strongly typed datatable.

procedure Last

Locate

Searches a dataset for a specified record, makes it the active record and returns true if a record is found that matches the specified criteria and that record is now active, otherwise returns false.

function Locate(const aKeyFields: string; const aKeyValues: Variant; aOptions: TLocateOptions): Boolean

Parameters:

  • aKeyFields: Input field or fields that should be matched in the dataset when doing a locate.
  • aKeyValues: Input field values that should be matched in the dataset when doing a locate.
  • aOptions: Options that are used during locating. Can have the following values: loCaseInsensitive or loPartialKey. By default, the value is empty.

Lookup

Retrieves field values from the record that matches specified search values and returns a variant or a variant array that contains the value or values of the fields specified by the comma-delimited string ResultFields on the specified record.

function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant

Parameters:

  • KeyFields: Input field or fields that should be matched in the dataset when doing a lookup.
  • KeyValues: Input field values that should be matched in the dataset when doing a lookup.
  • ResultFields: Result field collection that will include the output result set.

Moves the next record in the current strongly typed datatable.

procedure Next

Open

Opens the strongly typed datatable and prepares it for fetching records from the database. If the datatable is not empty, the cursor will be placed on the first available record; otherwise, EOF will be set to true to indicate that the end of the (empty) record set has been reached.

procedure Open

Post

Posts modified records to the related database.

procedure Post

Prior

Moves to the previous record in the strongly typed datatable.

procedure Prior

SetActive

Sets the new state of the strongly typed datatable: true if the datatable is active, false if the datatable is not active.

procedure SetActive(const Value: Boolean)

Parameters:


SetDetailOptions

Sets the options that are related with the current detail table (for master/detail datatables). The parameter Value can have the following values: dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates or dtIncludeInAllInOneFetch.

procedure SetDetailOptions(Value: TDADetailOptions)

Parameters:

  • Value: Specified input options

SetMasterOptions

Sets the options that are related with the current master table (for master/detail datatables). The parameter Value can have the following values: moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates or moAllInOneFetch.

procedure SetMasterOptions(Value: TDAMasterOptions)

Parameters:

  • Value: Specified input options