IDADataReader

Overview

The IDADataReader interface is used to obtain information about fields in Data Tables and Delta changes.

Data Tables implement this interface to provide access to the table field values:

var
  datareader:IDADataReader;
begin
  datareader := ClientDataModule.tbl_Employee as IDADataReader;
  //datareader.GetAsString('First_Name');
  //.........................................
end;

Delta implement this interface to provide access to the delta values:

var
  datareader:IDADataReader;
begin
  datareader := ClientDataModule.tbl_Employee.Delta.GetDelta as IDADataReader;
  //datareader.GetAsString('First_Name');
  //Returns a modified new value. If the specified field didn't modify that an exeption would be raised.
  //.........................................
end;

Location


 

FieldCount

Gets the number of fields contained in the dataset.

property FieldCount: Integer read

FieldIndexes

Returns a field index assosiated with the field name.

property FieldIndexes[aFieldName: string]: Integer read

FieldNames

Returns a field name assosiated with the field index.

property FieldNames[Index: Integer]: string read

First  safecall

Moves to the first change

function First: Boolean

GetAsBoolean (Integer): Boolean  overload safecall

Gets the value of the field as Boolean value.

function GetAsBoolean(Index: Integer): Boolean

Parameters:

  • Index: Index of the field

GetAsBoolean (string): Boolean  overload safecall

Gets the value of the field as Boolean value.

function GetAsBoolean(const FieldName: string): Boolean

Parameters:

  • FieldName: Name of the field

GetAsCurrency (Integer): Currency  overload safecall

Gets the value of the field as 64-bit fixed point currency value.

function GetAsCurrency(Index: Integer): Currency

Parameters:

  • Index: Index of the field

GetAsCurrency (string): Currency  overload safecall

Gets the value of the field as 64-bit fixed point currency value.

function GetAsCurrency(const FieldName: string): Currency

Parameters:

  • FieldName: Name of the field

GetAsDateTime (Integer): TDateTime  overload safecall

Gets the value of the field as TDateTime value.

function GetAsDateTime(Index: Integer): TDateTime

Parameters:

  • Index: Index of the field

GetAsDateTime (string): TDateTime  overload safecall

Gets the value of the field as TDateTime value.

function GetAsDateTime(const FieldName: string): TDateTime

Parameters:

  • FieldName: Name of the field

GetAsFloat (Integer): Double  overload safecall

Gets the value of the field as Float/Double value.

function GetAsFloat(Index: Integer): Double

Parameters:

  • Index: Index of the field

GetAsFloat (string): Double  overload safecall

Gets the value of the field as Float/Double value.

function GetAsFloat(const FieldName: string): Double

Parameters:

  • FieldName: Name of the field

GetAsInteger (Integer): Integer  overload safecall

Gets the value of the field as 32-bit integer value.

function GetAsInteger(Index: Integer): Integer

Parameters:

  • Index: Index of the field

GetAsInteger (string): Integer  overload safecall

Gets the value of the field as 32-bit integer value.

function GetAsInteger(const FieldName: string): Integer

Parameters:

  • FieldName: Name of the field

GetAsString (Integer): string  overload safecall

Gets the value of the field as string value.

function GetAsString(Index: Integer): string

Parameters:

  • Index: Index of the field

GetAsString (string): string  overload safecall

Gets the value of the field as string value.

function GetAsString(const FieldName: string): string

Parameters:

  • FieldName: Name of the field

GetAsVariant (Integer): Variant  overload safecall

Gets the value of the field as variant.

function GetAsVariant(Index: Integer): Variant

Parameters:

  • Index: Index of the field

GetAsVariant (string): Variant  overload safecall

Gets the value of the field as variant.

function GetAsVariant(const FieldName: string): Variant

Parameters:

  • FieldName: Name of the field

GetFieldCount  safecall

Gets the number of fields contained in the dataset.

function GetFieldCount: Integer

GetFieldIndexes  safecall

Returns the field index assosiated with the field name.

function GetFieldIndexes(const aName: string): Integer

Parameters:

  • aName: Name of the field

GetFieldNames  safecall

Returns the field name assosiated with the field index.

function GetFieldNames(Index: Integer): string

Parameters:

  • Index: Index of the field

GetRecordCount  safecall

Returns the number of records currently contained in the data table.

function GetRecordCount: Integer

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.

Moves the cursor to the next record in the dataset and makes it the active record.

function Next: Boolean

RecordCount

Returns the number of records currently contained in the data table.

property RecordCount: Integer read

 

FieldCount

Gets the number of fields contained in the dataset.

property FieldCount: Integer read

FieldIndexes

Returns a field index assosiated with the field name.

property FieldIndexes[aFieldName: string]: Integer read

FieldNames

Returns a field name assosiated with the field index.

property FieldNames[Index: Integer]: string read

RecordCount

Returns the number of records currently contained in the data table.

property RecordCount: Integer read

 

First  safecall

Moves to the first change

function First: Boolean

GetAsBoolean (Integer): Boolean  overload safecall

Gets the value of the field as Boolean value.

function GetAsBoolean(Index: Integer): Boolean

Parameters:

  • Index: Index of the field

GetAsBoolean (string): Boolean  overload safecall

Gets the value of the field as Boolean value.

function GetAsBoolean(const FieldName: string): Boolean

Parameters:

  • FieldName: Name of the field

GetAsCurrency (Integer): Currency  overload safecall

Gets the value of the field as 64-bit fixed point currency value.

function GetAsCurrency(Index: Integer): Currency

Parameters:

  • Index: Index of the field

GetAsCurrency (string): Currency  overload safecall

Gets the value of the field as 64-bit fixed point currency value.

function GetAsCurrency(const FieldName: string): Currency

Parameters:

  • FieldName: Name of the field

GetAsDateTime (Integer): TDateTime  overload safecall

Gets the value of the field as TDateTime value.

function GetAsDateTime(Index: Integer): TDateTime

Parameters:

  • Index: Index of the field

GetAsDateTime (string): TDateTime  overload safecall

Gets the value of the field as TDateTime value.

function GetAsDateTime(const FieldName: string): TDateTime

Parameters:

  • FieldName: Name of the field

GetAsFloat (Integer): Double  overload safecall

Gets the value of the field as Float/Double value.

function GetAsFloat(Index: Integer): Double

Parameters:

  • Index: Index of the field

GetAsFloat (string): Double  overload safecall

Gets the value of the field as Float/Double value.

function GetAsFloat(const FieldName: string): Double

Parameters:

  • FieldName: Name of the field

GetAsInteger (Integer): Integer  overload safecall

Gets the value of the field as 32-bit integer value.

function GetAsInteger(Index: Integer): Integer

Parameters:

  • Index: Index of the field

GetAsInteger (string): Integer  overload safecall

Gets the value of the field as 32-bit integer value.

function GetAsInteger(const FieldName: string): Integer

Parameters:

  • FieldName: Name of the field

GetAsString (Integer): string  overload safecall

Gets the value of the field as string value.

function GetAsString(Index: Integer): string

Parameters:

  • Index: Index of the field

GetAsString (string): string  overload safecall

Gets the value of the field as string value.

function GetAsString(const FieldName: string): string

Parameters:

  • FieldName: Name of the field

GetAsVariant (Integer): Variant  overload safecall

Gets the value of the field as variant.

function GetAsVariant(Index: Integer): Variant

Parameters:

  • Index: Index of the field

GetAsVariant (string): Variant  overload safecall

Gets the value of the field as variant.

function GetAsVariant(const FieldName: string): Variant

Parameters:

  • FieldName: Name of the field

GetFieldCount  safecall

Gets the number of fields contained in the dataset.

function GetFieldCount: Integer

GetFieldIndexes  safecall

Returns the field index assosiated with the field name.

function GetFieldIndexes(const aName: string): Integer

Parameters:

  • aName: Name of the field

GetFieldNames  safecall

Returns the field name assosiated with the field index.

function GetFieldNames(Index: Integer): string

Parameters:

  • Index: Index of the field

GetRecordCount  safecall

Returns the number of records currently contained in the data table.

function GetRecordCount: Integer

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.

Moves the cursor to the next record in the dataset and makes it the active record.

function Next: Boolean