TDAEDataset

Overview

The TDAEDataset class extends TDAEBaseDataset and adds connection support. It is a base class for dataset classes in a Data Abstract Driver.

Please refer to the article How to create a Data Abstract Driver (Delphi) for an overall description.

Location


 

constructor Create (IDAConnection, TDataset, string)  override    (declared in TDAEBaseDataset)

Creates a new instance.

constructor Create(aConnection: IDAConnection; aDataset: TDataset; const aName: string)

Parameters:

  • aConnection: Connection
  • aDataset: Dataset
  • aName: Name

constructor Create (TDAEConnection, string)  reintroduce virtual

Creates a new instance.

constructor Create(aConnection: TDAEConnection; const aName: string)

Parameters:

  • aConnection:
  • aName:

Active  protected    (declared in TDAEBaseDataset)

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

CachedParams  protected    (declared in TDAESQLCommand)

property CachedParams: TDictionary<string, Integer> read

CanUseNativeFieldData  protected safecall    (declared in TDAESQLCommand)

Specifies that given field can return data in GetNativeFieldData method

function CanUseNativeFieldData(Index: Integer): Boolean

Parameters:

  • Index: Required field index

Changed  protected    (declared in TDAEBaseDataset)

Indicates that SQL was changed and PrepareSQLStatement should be called

property Changed: Boolean read write

ClearParams  protected virtual    (declared in TDAESQLCommand)

Clears parameter values.

procedure ClearParams

Close  protected safecall    (declared in TDAEBaseDataset)

Closes the dataset

procedure Close

Connection  protected    (declared in TDAESQLCommand)

Presents the IDAConnection to access information about available databases, tables, columns, etc.

property Connection: IDAConnection read

Connection  protected

Connection

property Connection: TDAEConnection read

ControlsDisabled  protected safecall    (declared in TDAEBaseDataset)

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

function ControlsDisabled: Boolean

CreateDataset  protected virtual abstract

Creates native dataset object

function CreateDataset(aConnection: TDAEConnection): TDataset

Parameters:

  • aConnection: owner connection

CreateNativeDatabaseAccess  protected virtual    (declared in TDAESQLCommand)

Creates an IDANativeDatabaseAccess implementor.

function CreateNativeDatabaseAccess: IDANativeDatabaseAccess

CreateNativeObject  protected virtual

Creates the native object.

function CreateNativeObject(aConnection: TDAEConnection): TObject

Parameters:

  • aConnection: connection

CurrentRecIdValue  protected    (declared in TDAEBaseDataset)

not supported

property CurrentRecIdValue: Integer read write

Dataset    (declared in TDAESQLCommand)

Access to the standard VCL TDataSet.

property Dataset: TDataset read

DisableConstraints  protected safecall    (declared in TDAEBaseDataset)

Disables dataset constraints

procedure DisableConstraints

DisableControls  protected safecall    (declared in TDAEBaseDataset)

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

procedure DisableControls

DoCreateNativeObject  protected override

Creates a object specific to the given connection.

function DoCreateNativeObject: TObject

DoExecute  protected virtual safecall abstract    (declared in TDAEBaseDataset)

Executes SQL statement

function DoExecute: Integer

DoGetActive  protected dynamic    (declared in TDAEBaseDataset)

Returns current state

function DoGetActive: Boolean

DoGetBOF  protected dynamic    (declared in TDAEBaseDataset)

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 DoGetBOF: Boolean

DoGetEOF  protected dynamic    (declared in TDAEBaseDataset)

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).

function DoGetEOF: Boolean

DoGetRecordCount  protected dynamic    (declared in TDAEBaseDataset)

Returns the counf of records

function DoGetRecordCount: Integer

DoGetSQL  protected virtual safecall abstract    (declared in TDAEBaseDataset)

Gets the SQL statement

function DoGetSQL: string

DoLocate  protected dynamic    (declared in TDAEBaseDataset)

Locates and activates a record by key values.

function DoLocate(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.

DoNext  protected dynamic    (declared in TDAEBaseDataset)

Returns the result of the NativeDatabaseAccess.Next invocation. Please refer to the article How to create a Data Abstract Driver (Delphi) for more details.

procedure DoNext

DoPrepare  protected virtual safecall    (declared in TDAEBaseDataset)

Sets the property Prepared of the referred dataset to AValue.

procedure DoPrepare(Value: Boolean)

Parameters:

  • Value: state

DoSetActive  protected dynamic    (declared in TDAEBaseDataset)

Activates (True) or deactivates (False) the dataset. If the Value is true, the MacroProcessor of the active connection processes the Dynamic Where, retrieves and sets up the query parameters, activates the underlaid dataset (NativeDatabaseAccess) and binds the fields. If the Value is false, the underlaid dataset (NativeDatabaseAccess) is deactivated and the fields are unbound or cleared. Please refer to the article How to create a Data Abstract Driver (Delphi) for more details.

procedure DoSetActive(Value: Boolean)

Parameters:

  • Value: mode

DoSetSQL  protected virtual safecall abstract    (declared in TDAEBaseDataset)

Sets the SQL statement

procedure DoSetSQL(const Value: string)

Parameters:

  • Value: SQL statement

DynamicWhere  protected    (declared in TDAESQLCommand)

Implementation of Dynamic Where.

property DynamicWhere: TDAWhereBuilder read write

EnableConstraints  protected safecall    (declared in TDAEBaseDataset)

Enables dataset constraints

procedure EnableConstraints

EnableControls  protected safecall    (declared in TDAEBaseDataset)

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

procedure EnableControls

Eof  protected    (declared in TDAEBaseDataset)

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

Execute  protected override safecall    (declared in TDAEBaseDataset)

Executes the SQL command.

function Execute: Integer

FieldByName  protected safecall    (declared in TDAEBaseDataset)

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  protected    (declared in TDAEBaseDataset)

Indicates the number of fields contained in the dataset.

property FieldCount: Integer read

Fields  protected    (declared in TDAEBaseDataset)

Provides access to all the fields contained in the dataset.

property Fields: TDAFieldCollection read

FieldValues  protected    (declared in TDAEBaseDataset)

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

FindCachedParameter  protected    (declared in TDAESQLCommand)

function FindCachedParameter(const AParams: TParams; const AParamName: string): TParam

Parameters:

  • AParams:
  • AParamName:

FindField  safecall    (declared in TDAEBaseDataset)

Returns an item with the specified name.

function FindField(const aName: string): TDAField

Parameters:

  • aName: name of the searched field

FindParameter  protected    (declared in TDAESQLCommand)

Finds the AParamName parameter in the |TParams collection.

function FindParameter(const AParams: TParams; const AParamName: string): TParam

Parameters:

  • AParams:
  • AParamName:

FixFMTBCDIssue  protected    (declared in TDAEBaseDataset)

Corrects a known issue with parameters that have ftFMTBcd type.

procedure FixFMTBCDIssue

FixKnownIssues  protected virtual    (declared in TDAEBaseDataset)

Fixes known problems. at this moment, it can call FixFMTBCDIssue if it is required

procedure FixKnownIssues

FreeBookmark  protected safecall    (declared in TDAEBaseDataset)

Frees the resources allocated for a specified bookmark.

procedure FreeBookmark(Bookmark: TBookmark)

Parameters:

  • Bookmark: bookmark that should be freed

GetActive  protected safecall    (declared in TDAEBaseDataset)

Returns the result of the DoGetActive invocation.

function GetActive: Boolean

GetBOF  protected safecall    (declared in TDAEBaseDataset)

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  protected safecall    (declared in TDAEBaseDataset)

Allocates a bookmark for the active record

function GetBookMark: Pointer

GetCurrentMacroProcessor  protected override

Returns instance of used macro processor.

function GetCurrentMacroProcessor: TDASQLMacroProcessor

GetDataset  protected safecall    (declared in TDAESQLCommand)

Implements IDASQLCommand by returning the result of CreateDataset.

function GetDataset: TDataset

GetFieldValues  protected safecall    (declared in TDAEBaseDataset)

Returns value of data table's field specified by index

function GetFieldValues(Index: Integer): Variant

Parameters:

  • Index: index of the field

GetName  protected safecall    (declared in TDAESQLCommand)

Implements IDASQLCommand by returning a value set in the constructor.

function GetName: string

GetNativeFieldData  protected override safecall    (declared in TDAEBaseDataset)

Sets the DataSize to the according field size value, allocates the Data memory and copies the content of the field.

function GetNativeFieldData(Index: Integer; var Buffer: TBytes): Boolean

Parameters:

  • Index: Required field index
  • Buffer:

GetNativeFieldDataType  protected safecall    (declared in TDAESQLCommand)

Returns the field type of the Index field

function GetNativeFieldDataType(Index: Integer): TFieldType

Parameters:

  • Index: field index

GetParams  protected safecall    (declared in TDAESQLCommand)

Implements IDASQLCommand by returning the current parameters.

function GetParams: TDAParamCollection

GetParamValues  protected virtual safecall abstract    (declared in TDAESQLCommand)

Retrieves the values of the given parameters.

procedure GetParamValues(Params: TDAParamCollection)

Parameters:

  • Params: Parameters

GetParamValuesStd  protected    (declared in TDAESQLCommand)

Retrieves the values from Params2 for the daptOutput, daptInputOutput and daptResult parameters of Params1.

procedure GetParamValuesStd(Params1: TDAParamCollection; Params2: TParams)

Parameters:

  • Params1: Parameters guide
  • Params2: Values source

GetRowRecIDValue  protected    (declared in TDAEBaseDataset)

function GetRowRecIDValue: Integer

GotoBookmark  protected safecall    (declared in TDAEBaseDataset)

Positions on the record to which a specified bookmark points.

procedure GotoBookmark(Bookmark: TBookmark)

Parameters:

  • Bookmark: record identified by this Bookmark should be active

intVCLTypeToDAType  protected virtual    (declared in TDAESQLCommand)

Gets mapping |TFieldType to TDADataType.

function intVCLTypeToDAType(aFieldType: TFieldType; ASize: Integer; ADecimalPrecision: Integer; aDecimalScale: Integer): TDADataType

Parameters:

  • aFieldType:
  • ASize:
  • ADecimalPrecision:
  • aDecimalScale:

isConnectioninRefreshFieldsMode  protected override

Indicates the special mode in which (0=1) where statement is added to Dynamic Where.

function isConnectioninRefreshFieldsMode: Boolean

IsEmpty  protected    (declared in TDAEBaseDataset)

Indicates whether the dataset contains no records.

property IsEmpty: Boolean read

IsNeedToFixFMTBCDIssue  protected virtual    (declared in TDAEBaseDataset)

This is a virtual method (instrumental interface) to correct possible incompatibilities of the concrete implementation of the dataset (the known issue with the ZEOS driver). Please refer to the article How to create a Data Abstract Driver (Delphi) for more details.

function IsNeedToFixFMTBCDIssue: Boolean

IsTDatasetCompatible  protected safecall    (declared in TDAESQLCommand)

Returns true if data access object is TDataset descendant.

function IsTDatasetCompatible: Boolean

Locate  protected safecall    (declared in TDAEBaseDataset)

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  protected    (declared in TDAEBaseDataset)

Defines the name of the data table.

property LogicalName: string read write

Lookup  protected safecall    (declared in TDAEBaseDataset)

Returns the result of the NativeDatabaseAccess.Lookup invocation.

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

Parameters:

  • KeyFields: Comma-delimited list of fields
  • KeyValues: Variant or Variant array of values
  • ResultFields: Comma-delimited list of fields

Name  protected    (declared in TDAESQLCommand)

Returns a human-readable name for the command.

property Name: string read

Names  protected    (declared in TDAEBaseDataset)

Returns data table's field name specified by Index

property Names[Index: Integer]: string read

NativeDatabaseAccess  protected    (declared in TDAESQLCommand)

property NativeDatabaseAccess: IDANativeDatabaseAccess read

NativeFieldCount  protected safecall    (declared in TDAESQLCommand)

Implements IDASQLCommandNativeObject by delegating the call to the FNativeDatabaseAccess member.

function NativeFieldCount: Integer

NativeFields  protected    (declared in TDAESQLCommand)

property NativeFields[Index: Integer]: IDANativeField read

NativeFindField  protected safecall    (declared in TDAESQLCommand)

Implements IDASQLCommandNativeObject by delegating the call to the FNativeDatabaseAccess member.

function NativeFindField(const FieldName: string): IDANativeField

Parameters:

  • FieldName: name of the searched field

NativeObject  protected    (declared in TDAESQLCommand)

Access to the standard VCL |TObject which implements the data access.

property NativeObject: TObject read

Invokes DoNext.

procedure Next

OnAfterExecute    (declared in TDAESQLCommand)

Fires right after a command was executed.

property OnAfterExecute: TDAAfterExecuteCommandEvent read write
delegate: procedure OnAfterExecute(const Sender: IDASQLCommand; ActualSQL: string; ElapsedMilliseconds: Cardinal)

OnAfterOpen    (declared in TDAEBaseDataset)

Fires after dataset was opened

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

OnBeforeExecute    (declared in TDAESQLCommand)

Fires before command execution

property OnBeforeExecute: TDABeforeExecuteCommandEvent read write
delegate: procedure OnBeforeExecute(const Sender: IDASQLCommand)

OnBeforeOpen    (declared in TDAEBaseDataset)

Fires before dataset was opened

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

OnExecuteError    (declared in TDAESQLCommand)

Fires when exception is detected during command execution

property OnExecuteError: TDAExecuteCommandErrorEvent read write
delegate: procedure OnExecuteError(const Sender: IDASQLCommand; ActualSQL: string; Error: Exception)

OnOpenError    (declared in TDAEBaseDataset)

Fired if error was occured duting opening of dataset

property OnOpenError: TDAOpenDatasetErrorEvent read write
delegate: procedure OnOpenError(const Sender: IDADataset; ActualSQL: string; Error: Exception)

Open  protected safecall    (declared in TDAEBaseDataset)

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

procedure Open

OrderBy  protected    (declared in TDAEBaseDataset)

Represents the collection of OrderBy statements.

property OrderBy: TDAOrderByCollection read write

ParamByName  protected safecall    (declared in TDAESQLCommand)

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  protected    (declared in TDAESQLCommand)

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

property Params: TDAParamCollection read

Prepared  protected    (declared in TDAESQLCommand)

Specifies whether the SQL statement has been prepared for execution on the database (true) or not (false). Setting this property to true will automatically prepare the statement. Preparing statements on the database server allows for faster execution, especially if the statement will be executed multiple times, as the server will not need to re-parse the SQL text for every execution. Please refer to your database system's documentation for more information on preparing statements.

Note that changing the SQL or Where properties will automatically un-prepare the statement.

property Prepared: Boolean read write

PrepareSQLStatement  protected override    (declared in TDAEBaseDataset)

Builds a well formed SQL instruction and prepares it via DoPrepare.

procedure PrepareSQLStatement

RecordCount  protected    (declared in TDAEBaseDataset)

Returns the count of records

property RecordCount: Integer read

RecreateCachedParams  protected    (declared in TDAESQLCommand)

procedure RecreateCachedParams(aParams: TParams)

Parameters:

  • aParams:

Refresh  protected safecall    (declared in TDAEBaseDataset)

Reopens the dataset.

procedure Refresh

RefreshParams  protected override safecall    (declared in TDAEBaseDataset)

Refreshes the list of parameters defined for the command based on the actual parameter names found in the SQL statement and Where clause.

procedure RefreshParams

RowRecIdValue  protected    (declared in TDAEBaseDataset)

Returns -1

property RowRecIdValue: Integer read

SetActive  protected safecall    (declared in TDAEBaseDataset)

Activates (True) or deactivates (False) the dataset.

procedure SetActive(Value: Boolean)

Parameters:

  • Value: mode

SetParamValues  protected virtual safecall abstract    (declared in TDAESQLCommand)

Converts values from Data Abstract TDAParam values.

procedure SetParamValues(Params: TDAParamCollection)

Parameters:

  • Params: parameters

SetParamValuesStd  protected    (declared in TDAESQLCommand)

Utility method to set the values of Params2 (|TParams) for the daptOutput, daptInputOutput and daptResult parameters of Params1 (TDAParamCollection).

procedure SetParamValuesStd(Params1: TDAParamCollection; Params2: TParams)

Parameters:

  • Params1: Parameters guide
  • Params2: Values holder

SQL  protected    (declared in TDAESQLCommand)

Defines the SQL statement to be executed.

property SQL: string read write

SQLContainsDynamicWhere  protected override safecall    (declared in TDAEBaseDataset)

Checks if SQL contains Dynamic Where macros.

function SQLContainsDynamicWhere: Boolean

State  protected    (declared in TDAEBaseDataset)

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

WhereClause  protected    (declared in TDAEBaseDataset)

Where clause as plain string:

  (table.Field = 25) or (table.Field2 = "test")
property WhereClause: string read write

 

Active  protected    (declared in TDAEBaseDataset)

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

CachedParams  protected    (declared in TDAESQLCommand)

property CachedParams: TDictionary<string, Integer> read

Changed  protected    (declared in TDAEBaseDataset)

Indicates that SQL was changed and PrepareSQLStatement should be called

property Changed: Boolean read write

Connection  protected    (declared in TDAESQLCommand)

Presents the IDAConnection to access information about available databases, tables, columns, etc.

property Connection: IDAConnection read

Connection  protected

Connection

property Connection: TDAEConnection read

CurrentRecIdValue  protected    (declared in TDAEBaseDataset)

not supported

property CurrentRecIdValue: Integer read write

Dataset    (declared in TDAESQLCommand)

Access to the standard VCL TDataSet.

property Dataset: TDataset read

DynamicWhere  protected    (declared in TDAESQLCommand)

Implementation of Dynamic Where.

property DynamicWhere: TDAWhereBuilder read write

Eof  protected    (declared in TDAEBaseDataset)

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  protected    (declared in TDAEBaseDataset)

Indicates the number of fields contained in the dataset.

property FieldCount: Integer read

Fields  protected    (declared in TDAEBaseDataset)

Provides access to all the fields contained in the dataset.

property Fields: TDAFieldCollection read

FieldValues  protected    (declared in TDAEBaseDataset)

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  protected    (declared in TDAEBaseDataset)

Indicates whether the dataset contains no records.

property IsEmpty: Boolean read

LogicalName  protected    (declared in TDAEBaseDataset)

Defines the name of the data table.

property LogicalName: string read write

Name  protected    (declared in TDAESQLCommand)

Returns a human-readable name for the command.

property Name: string read

Names  protected    (declared in TDAEBaseDataset)

Returns data table's field name specified by Index

property Names[Index: Integer]: string read

NativeDatabaseAccess  protected    (declared in TDAESQLCommand)

property NativeDatabaseAccess: IDANativeDatabaseAccess read

NativeFields  protected    (declared in TDAESQLCommand)

property NativeFields[Index: Integer]: IDANativeField read

NativeObject  protected    (declared in TDAESQLCommand)

Access to the standard VCL |TObject which implements the data access.

property NativeObject: TObject read

OrderBy  protected    (declared in TDAEBaseDataset)

Represents the collection of OrderBy statements.

property OrderBy: TDAOrderByCollection read write

Params  protected    (declared in TDAESQLCommand)

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

property Params: TDAParamCollection read

Prepared  protected    (declared in TDAESQLCommand)

Specifies whether the SQL statement has been prepared for execution on the database (true) or not (false). Setting this property to true will automatically prepare the statement. Preparing statements on the database server allows for faster execution, especially if the statement will be executed multiple times, as the server will not need to re-parse the SQL text for every execution. Please refer to your database system's documentation for more information on preparing statements.

Note that changing the SQL or Where properties will automatically un-prepare the statement.

property Prepared: Boolean read write

RecordCount  protected    (declared in TDAEBaseDataset)

Returns the count of records

property RecordCount: Integer read

RowRecIdValue  protected    (declared in TDAEBaseDataset)

Returns -1

property RowRecIdValue: Integer read

SQL  protected    (declared in TDAESQLCommand)

Defines the SQL statement to be executed.

property SQL: string read write

State  protected    (declared in TDAEBaseDataset)

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

WhereClause  protected    (declared in TDAEBaseDataset)

Where clause as plain string:

  (table.Field = 25) or (table.Field2 = "test")
property WhereClause: string read write

 

constructor Create (IDAConnection, TDataset, string)  override    (declared in TDAEBaseDataset)

Creates a new instance.

constructor Create(aConnection: IDAConnection; aDataset: TDataset; const aName: string)

Parameters:

  • aConnection: Connection
  • aDataset: Dataset
  • aName: Name

constructor Create (TDAEConnection, string)  reintroduce virtual

Creates a new instance.

constructor Create(aConnection: TDAEConnection; const aName: string)

Parameters:

  • aConnection:
  • aName:

CanUseNativeFieldData  protected safecall    (declared in TDAESQLCommand)

Specifies that given field can return data in GetNativeFieldData method

function CanUseNativeFieldData(Index: Integer): Boolean

Parameters:

  • Index: Required field index

ClearParams  protected virtual    (declared in TDAESQLCommand)

Clears parameter values.

procedure ClearParams

Close  protected safecall    (declared in TDAEBaseDataset)

Closes the dataset

procedure Close

ControlsDisabled  protected safecall    (declared in TDAEBaseDataset)

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

function ControlsDisabled: Boolean

CreateDataset  protected virtual abstract

Creates native dataset object

function CreateDataset(aConnection: TDAEConnection): TDataset

Parameters:

  • aConnection: owner connection

CreateNativeDatabaseAccess  protected virtual    (declared in TDAESQLCommand)

Creates an IDANativeDatabaseAccess implementor.

function CreateNativeDatabaseAccess: IDANativeDatabaseAccess

CreateNativeObject  protected virtual

Creates the native object.

function CreateNativeObject(aConnection: TDAEConnection): TObject

Parameters:

  • aConnection: connection

DisableConstraints  protected safecall    (declared in TDAEBaseDataset)

Disables dataset constraints

procedure DisableConstraints

DisableControls  protected safecall    (declared in TDAEBaseDataset)

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

procedure DisableControls

DoCreateNativeObject  protected override

Creates a object specific to the given connection.

function DoCreateNativeObject: TObject

DoExecute  protected virtual safecall abstract    (declared in TDAEBaseDataset)

Executes SQL statement

function DoExecute: Integer

DoGetActive  protected dynamic    (declared in TDAEBaseDataset)

Returns current state

function DoGetActive: Boolean

DoGetBOF  protected dynamic    (declared in TDAEBaseDataset)

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 DoGetBOF: Boolean

DoGetEOF  protected dynamic    (declared in TDAEBaseDataset)

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).

function DoGetEOF: Boolean

DoGetRecordCount  protected dynamic    (declared in TDAEBaseDataset)

Returns the counf of records

function DoGetRecordCount: Integer

DoGetSQL  protected virtual safecall abstract    (declared in TDAEBaseDataset)

Gets the SQL statement

function DoGetSQL: string

DoLocate  protected dynamic    (declared in TDAEBaseDataset)

Locates and activates a record by key values.

function DoLocate(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.

DoNext  protected dynamic    (declared in TDAEBaseDataset)

Returns the result of the NativeDatabaseAccess.Next invocation. Please refer to the article How to create a Data Abstract Driver (Delphi) for more details.

procedure DoNext

DoPrepare  protected virtual safecall    (declared in TDAEBaseDataset)

Sets the property Prepared of the referred dataset to AValue.

procedure DoPrepare(Value: Boolean)

Parameters:

  • Value: state

DoSetActive  protected dynamic    (declared in TDAEBaseDataset)

Activates (True) or deactivates (False) the dataset. If the Value is true, the MacroProcessor of the active connection processes the Dynamic Where, retrieves and sets up the query parameters, activates the underlaid dataset (NativeDatabaseAccess) and binds the fields. If the Value is false, the underlaid dataset (NativeDatabaseAccess) is deactivated and the fields are unbound or cleared. Please refer to the article How to create a Data Abstract Driver (Delphi) for more details.

procedure DoSetActive(Value: Boolean)

Parameters:

  • Value: mode

DoSetSQL  protected virtual safecall abstract    (declared in TDAEBaseDataset)

Sets the SQL statement

procedure DoSetSQL(const Value: string)

Parameters:

  • Value: SQL statement

EnableConstraints  protected safecall    (declared in TDAEBaseDataset)

Enables dataset constraints

procedure EnableConstraints

EnableControls  protected safecall    (declared in TDAEBaseDataset)

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

procedure EnableControls

Execute  protected override safecall    (declared in TDAEBaseDataset)

Executes the SQL command.

function Execute: Integer

FieldByName  protected safecall    (declared in TDAEBaseDataset)

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

FindCachedParameter  protected    (declared in TDAESQLCommand)

function FindCachedParameter(const AParams: TParams; const AParamName: string): TParam

Parameters:

  • AParams:
  • AParamName:

FindField  safecall    (declared in TDAEBaseDataset)

Returns an item with the specified name.

function FindField(const aName: string): TDAField

Parameters:

  • aName: name of the searched field

FindParameter  protected    (declared in TDAESQLCommand)

Finds the AParamName parameter in the |TParams collection.

function FindParameter(const AParams: TParams; const AParamName: string): TParam

Parameters:

  • AParams:
  • AParamName:

FixFMTBCDIssue  protected    (declared in TDAEBaseDataset)

Corrects a known issue with parameters that have ftFMTBcd type.

procedure FixFMTBCDIssue

FixKnownIssues  protected virtual    (declared in TDAEBaseDataset)

Fixes known problems. at this moment, it can call FixFMTBCDIssue if it is required

procedure FixKnownIssues

FreeBookmark  protected safecall    (declared in TDAEBaseDataset)

Frees the resources allocated for a specified bookmark.

procedure FreeBookmark(Bookmark: TBookmark)

Parameters:

  • Bookmark: bookmark that should be freed

GetActive  protected safecall    (declared in TDAEBaseDataset)

Returns the result of the DoGetActive invocation.

function GetActive: Boolean

GetBOF  protected safecall    (declared in TDAEBaseDataset)

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  protected safecall    (declared in TDAEBaseDataset)

Allocates a bookmark for the active record

function GetBookMark: Pointer

GetCurrentMacroProcessor  protected override

Returns instance of used macro processor.

function GetCurrentMacroProcessor: TDASQLMacroProcessor

GetDataset  protected safecall    (declared in TDAESQLCommand)

Implements IDASQLCommand by returning the result of CreateDataset.

function GetDataset: TDataset

GetFieldValues  protected safecall    (declared in TDAEBaseDataset)

Returns value of data table's field specified by index

function GetFieldValues(Index: Integer): Variant

Parameters:

  • Index: index of the field

GetName  protected safecall    (declared in TDAESQLCommand)

Implements IDASQLCommand by returning a value set in the constructor.

function GetName: string

GetNativeFieldData  protected override safecall    (declared in TDAEBaseDataset)

Sets the DataSize to the according field size value, allocates the Data memory and copies the content of the field.

function GetNativeFieldData(Index: Integer; var Buffer: TBytes): Boolean

Parameters:

  • Index: Required field index
  • Buffer:

GetNativeFieldDataType  protected safecall    (declared in TDAESQLCommand)

Returns the field type of the Index field

function GetNativeFieldDataType(Index: Integer): TFieldType

Parameters:

  • Index: field index

GetParams  protected safecall    (declared in TDAESQLCommand)

Implements IDASQLCommand by returning the current parameters.

function GetParams: TDAParamCollection

GetParamValues  protected virtual safecall abstract    (declared in TDAESQLCommand)

Retrieves the values of the given parameters.

procedure GetParamValues(Params: TDAParamCollection)

Parameters:

  • Params: Parameters

GetParamValuesStd  protected    (declared in TDAESQLCommand)

Retrieves the values from Params2 for the daptOutput, daptInputOutput and daptResult parameters of Params1.

procedure GetParamValuesStd(Params1: TDAParamCollection; Params2: TParams)

Parameters:

  • Params1: Parameters guide
  • Params2: Values source

GetRowRecIDValue  protected    (declared in TDAEBaseDataset)

function GetRowRecIDValue: Integer

GotoBookmark  protected safecall    (declared in TDAEBaseDataset)

Positions on the record to which a specified bookmark points.

procedure GotoBookmark(Bookmark: TBookmark)

Parameters:

  • Bookmark: record identified by this Bookmark should be active

intVCLTypeToDAType  protected virtual    (declared in TDAESQLCommand)

Gets mapping |TFieldType to TDADataType.

function intVCLTypeToDAType(aFieldType: TFieldType; ASize: Integer; ADecimalPrecision: Integer; aDecimalScale: Integer): TDADataType

Parameters:

  • aFieldType:
  • ASize:
  • ADecimalPrecision:
  • aDecimalScale:

isConnectioninRefreshFieldsMode  protected override

Indicates the special mode in which (0=1) where statement is added to Dynamic Where.

function isConnectioninRefreshFieldsMode: Boolean

IsNeedToFixFMTBCDIssue  protected virtual    (declared in TDAEBaseDataset)

This is a virtual method (instrumental interface) to correct possible incompatibilities of the concrete implementation of the dataset (the known issue with the ZEOS driver). Please refer to the article How to create a Data Abstract Driver (Delphi) for more details.

function IsNeedToFixFMTBCDIssue: Boolean

IsTDatasetCompatible  protected safecall    (declared in TDAESQLCommand)

Returns true if data access object is TDataset descendant.

function IsTDatasetCompatible: Boolean

Locate  protected safecall    (declared in TDAEBaseDataset)

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  protected safecall    (declared in TDAEBaseDataset)

Returns the result of the NativeDatabaseAccess.Lookup invocation.

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

Parameters:

  • KeyFields: Comma-delimited list of fields
  • KeyValues: Variant or Variant array of values
  • ResultFields: Comma-delimited list of fields

NativeFieldCount  protected safecall    (declared in TDAESQLCommand)

Implements IDASQLCommandNativeObject by delegating the call to the FNativeDatabaseAccess member.

function NativeFieldCount: Integer

NativeFindField  protected safecall    (declared in TDAESQLCommand)

Implements IDASQLCommandNativeObject by delegating the call to the FNativeDatabaseAccess member.

function NativeFindField(const FieldName: string): IDANativeField

Parameters:

  • FieldName: name of the searched field

Invokes DoNext.

procedure Next

Open  protected safecall    (declared in TDAEBaseDataset)

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

procedure Open

ParamByName  protected safecall    (declared in TDAESQLCommand)

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

PrepareSQLStatement  protected override    (declared in TDAEBaseDataset)

Builds a well formed SQL instruction and prepares it via DoPrepare.

procedure PrepareSQLStatement

RecreateCachedParams  protected    (declared in TDAESQLCommand)

procedure RecreateCachedParams(aParams: TParams)

Parameters:

  • aParams:

Refresh  protected safecall    (declared in TDAEBaseDataset)

Reopens the dataset.

procedure Refresh

RefreshParams  protected override safecall    (declared in TDAEBaseDataset)

Refreshes the list of parameters defined for the command based on the actual parameter names found in the SQL statement and Where clause.

procedure RefreshParams

SetActive  protected safecall    (declared in TDAEBaseDataset)

Activates (True) or deactivates (False) the dataset.

procedure SetActive(Value: Boolean)

Parameters:

  • Value: mode

SetParamValues  protected virtual safecall abstract    (declared in TDAESQLCommand)

Converts values from Data Abstract TDAParam values.

procedure SetParamValues(Params: TDAParamCollection)

Parameters:

  • Params: parameters

SetParamValuesStd  protected    (declared in TDAESQLCommand)

Utility method to set the values of Params2 (|TParams) for the daptOutput, daptInputOutput and daptResult parameters of Params1 (TDAParamCollection).

procedure SetParamValuesStd(Params1: TDAParamCollection; Params2: TParams)

Parameters:

  • Params1: Parameters guide
  • Params2: Values holder

SQLContainsDynamicWhere  protected override safecall    (declared in TDAEBaseDataset)

Checks if SQL contains Dynamic Where macros.

function SQLContainsDynamicWhere: Boolean

 

OnAfterExecute    (declared in TDAESQLCommand)

Fires right after a command was executed.

property OnAfterExecute: TDAAfterExecuteCommandEvent read write
delegate: procedure OnAfterExecute(const Sender: IDASQLCommand; ActualSQL: string; ElapsedMilliseconds: Cardinal)

OnAfterOpen    (declared in TDAEBaseDataset)

Fires after dataset was opened

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

OnBeforeExecute    (declared in TDAESQLCommand)

Fires before command execution

property OnBeforeExecute: TDABeforeExecuteCommandEvent read write
delegate: procedure OnBeforeExecute(const Sender: IDASQLCommand)

OnBeforeOpen    (declared in TDAEBaseDataset)

Fires before dataset was opened

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

OnExecuteError    (declared in TDAESQLCommand)

Fires when exception is detected during command execution

property OnExecuteError: TDAExecuteCommandErrorEvent read write
delegate: procedure OnExecuteError(const Sender: IDASQLCommand; ActualSQL: string; Error: Exception)

OnOpenError    (declared in TDAEBaseDataset)

Fired if error was occured duting opening of dataset

property OnOpenError: TDAOpenDatasetErrorEvent read write
delegate: procedure OnOpenError(const Sender: IDADataset; ActualSQL: string; Error: Exception)