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

Implemented in

 

FieldCount

Gets the number of fields contained in the dataset.

property FieldCount: integer read write

FieldIndexes

Returns a field index assosiated with the field name.

property FieldIndexes[aFieldName: string]: integer read write

FieldNames

Returns a field name assosiated with the field index.

property FieldNames[Index: integer]: string read write

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.

Next  safecall

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 write

 

FieldCount

Gets the number of fields contained in the dataset.

property FieldCount: integer read write

FieldIndexes

Returns a field index assosiated with the field name.

property FieldIndexes[aFieldName: string]: integer read write

FieldNames

Returns a field name assosiated with the field index.

property FieldNames[Index: integer]: string read write

RecordCount

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

property RecordCount: integer read write

 

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.

Next  safecall

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

function Next: boolean

See Also