TDALocalDataAdapter
Overview
The TDALocalDataAdapter component forms the center of communication from the client to the server. It provides all the logic for retrieving data into TDADataTables, applying changes (Deltas) back to the server and handling any other data-related communication with the server, such as retrieving business rules scripts or schema information. Contrary to the TDARemoteDataAdapter class, the TDALocalDataAdapter only works with local services.
The usage of this class is similar to the usage of the TDARemoteDataAdapter.
Location
- Unit: uDALocalDataAdapter.pas
- Ancestry: TComponent | TROComponent | TDACustomDataAdapter | TDABaseDataAdapter | TDALocalDataAdapter
constructor Create (TComponent) override (declared in TDABaseDataAdapter)
Standard component constructor
constructor Create(aOwner: TComponent)
Parameters:
- aOwner: Owner
constructor Create (IDataAbstractLocalServiceAccess) reintroduce overload
Creates a new instance and initializes the ServiceInstance property.
constructor Create(const aServiceInstance: IDataAbstractLocalServiceAccess)
Parameters:
- aServiceInstance: Data Service instance that will be used to execute the TDALocalDataAdapter methods
constructor Create (string) reintroduce overload
Creates a new instance and initializes the ServiceName property.
constructor Create(const aServiceName: string)
Parameters:
- aServiceName: Name of the Data Service that will be used to execute the TDALocalDataAdapter methods
ApplyUpdates override (declared in TDABaseDataAdapter)
Applies local updates, which are represented in the collection of data tables, back to the server and returns true if the updates were successfully applied on the server. Otherwise returns false.
function ApplyUpdates(aTables: array of TDADataTable; aRefetchAll: Boolean): Boolean
Parameters:
- aTables: Input collection of data tables with updates that should be applied on the server.
- aRefetchAll:
True
: the data tables reopen after applying updates on the server.False
: they don't reopen. By default, this parameter equalsFalse
.
Assign override (declared in TDABaseDataAdapter)
Copies the contents of another, similar object.
procedure Assign(Source: TPersistent)
Parameters:
- Source: Instance whose properties will be copied
AutoFillScripts (declared in TDABaseDataAdapter)
Autofills business rules scripts at opening tables
property AutoFillScripts: Boolean read write
CacheSchema protected (declared in TDABaseDataAdapter)
Toggles whether the data adapter will maintain a local cache of the schema retrieved from the server with subsequent calls to the Schema property. If set to true, the adapter will download the schema the first time the Schema property is accessed, and subsequent accesses will return the same schema instance. If set to false (default), the schema will be re-downloaded from the server every time. You can flush any cached schema by setting this property to false and then immediately back to true, or by calling the FlushSchema method. Set this property to false when you expect frequent changes in the schema information, or when you want to update data tables to a changed server, at design time. Set it to true you want your application to only obtain the schema once and don't expect the server-side schema to change while the application is running.
property CacheSchema: Boolean read write
CheckProperties override
procedure CheckProperties(ACheckOnlyDataStreamer: Boolean)
Parameters:
- ACheckOnlyDataStreamer:
CreateTableRequestInfo protected (declared in TDABaseDataAdapter)
Generates TableRequestInfo based on given parameters.
function CreateTableRequestInfo(aTable: TDADataTable; aIncludeSchema: Boolean; aDynamicWhereExpression: TDAWhereExpression): TableRequestInfo
Parameters:
- aTable: datatable
- aIncludeSchema: include schema
- aDynamicWhereExpression: dynamic where expression
DataStreamer protected (declared in TDACustomDataAdapter)
Defines the type of data streamer to be used for reading and writing data from and to the network. The type of streamer assigned here must match the streamer used on the ServiceDataStreamer property of the sever in the descendant classes.
property DataStreamer: TDADataStreamer read write
DynamicSelect (declared in TDABaseDataAdapter)
Flag indicating whether Data Adapter should perform queries using the Dynamic Select feature.
property DynamicSelect: Boolean read write
Execute (string): Integer overload (declared in TDABaseDataAdapter)
Executes the command with the given name and returns the number of affected rows.
function Execute(aCommandName: string): Integer
Parameters:
- aCommandName: Name of the command that is declared in the schema.
Execute (string, array of Variant): Integer overload (declared in TDABaseDataAdapter)
Executes the command with the given input parameters and returns the number of affected rows.
function Execute(aCommandName: string; aInputParameters: array of Variant): Integer
Parameters:
- aCommandName: Name of the command that is declared in the schema.
- aInputParameters: Specified array with input parameters.
Execute (string, DataParameterArray): Integer overload (declared in TDABaseDataAdapter)
Executes the command with the given name and input parameters and returns the number of affected rows.
function Execute(aCommandName: string; aInputParameters: DataParameterArray): Integer
Parameters:
- aCommandName: Name of the command that is declared in the schema.
- aInputParameters: Specified array with input parameters.
Execute (string, DataParameterArray, DataParameterArray): Integer overload (declared in TDABaseDataAdapter)
Executes the command with the given name and input parameters and returns the number of affected rows.
function Execute(aCommandName: string; aInputParameters: DataParameterArray; out aOutputParameters: DataParameterArray): Integer
Parameters:
- aCommandName: Name of the command that is declared in the schema.
- aInputParameters: Specified array with input parameters.
- aOutputParameters: Specified array with output parameters.
FailureBehavior (declared in TDABaseDataAdapter)
Manages how TDABaseRemoteDataAdapter behaves when an error is encountered.
property FailureBehavior: TDAFailureBehavior read write
Fill (array of TDADataTable, Boolean, Boolean, Boolean) overload override (declared in TDABaseDataAdapter)
Retrieves data from the server for all of the specified TDADataTables. In most scenarios you will not call this method yourself, but simply open the respective data table, causing data to be retrieved automatically. However, calling Fill yourself provides additional flexibility, including the option to fill multiple data tables at the same time, avoiding unnecessary server round-trips.
procedure Fill(aTables: array of TDADataTable; aSaveCursor: Boolean; aIncludeSchema: Boolean; aAppendMode: Boolean)
Parameters:
- aTables: The specified collection of data tables that should receive the data from the server.
- aSaveCursor: Defines whether the cursors that are related with the collection of data tables should be saved (true) or not (false).
- aIncludeSchema: Defines whether the schema should be included while creating table request information (true) or not (false).
- aAppendMode: Defines whether the AppendMode in the related TDATableOptionsArray collection should be set (true) or not (false). By default, this parameter equals false.
Fill (array of TDADataTable, TableRequestInfoArray_TableRequestInfo, Boolean, Boolean, Boolean) overload (declared in TDABaseDataAdapter)
Retrieves data from the server for all of the specified TDADataTables. In most scenarios you will not call this method yourself, but simply open the respective data table, causing data to be retrieved automatically. However, calling Fill yourself provides additional flexibility, including the option to fill multiple data tables at the same time, avoiding unnecessary server round-trips.
procedure Fill(aTables: array of TDADataTable; aTableRequestInfoArray: TableRequestInfoArray_TableRequestInfo; aSaveCursor: Boolean; aIncludeSchema: Boolean; aAppendMode: Boolean)
Parameters:
- aTables: The specified collection of data tables that should receive the data from the server.
- aTableRequestInfoArray: The specified collection of TableRequestInfo that contains additional parameters.
- aSaveCursor: Defines whether the cursors that are related with the collection of data tables should be saved (true) or not (false).
- aIncludeSchema: Defines whether the schema should be included while creating table request information (true) or not (false).
- aAppendMode: Defines whether the AppendMode in the related TDATableOptionsArray collection should be set (true) or not (false). By default, this parameter equals false.
Fill (array of TDADataTable, array of TDAWhereExpression, Boolean, Boolean, Boolean) overload (declared in TDABaseDataAdapter)
Retrieves data from the server for all of the specified TDADataTables. In most scenarios you will not call this method yourself, but simply open the respective data table, causing data to be retrieved automatically. However, calling Fill yourself provides additional flexibility, including the option to fill multiple data tables at the same time, avoiding unnecessary server round-trips.
procedure Fill(aTables: array of TDADataTable; aWhereClauses: array of TDAWhereExpression; aSaveCursor: Boolean; aIncludeSchema: Boolean; aAppendMode: Boolean)
Parameters:
- aTables: The specified collection of data tables that should receive the data from the server.
- aWhereClauses: The specified collection of where clasuses that should receive the data from the server.
- aSaveCursor: Defines whether the cursors that are related with the collection of data tables should be saved (true) or not (false).
- aIncludeSchema: Defines whether the schema should be included while creating table request information (true) or not (false).
- aAppendMode: Defines whether the AppendMode in the related TDATableOptionsArray collection should be set (true) or not (false). By default, this parameter equals false.
FillSchema (array of TDADataTable, Boolean, Boolean) override (declared in TDABaseDataAdapter)
Retrieves schema information for all of the specified TDADataTable, and configures their Fields and Params setup to match the schema from the server. You can perform the same task at design-time for individual data tables by right-clicking the data table component and selecting "Retrieve DataTable Schema" from the context menu.
procedure FillSchema(aTables: array of TDADataTable; aPreserveLookupFields: Boolean; aPreserveClientCalcFields: Boolean)
Parameters:
- aTables:
- aPreserveLookupFields:
- aPreserveClientCalcFields:
FillSchema (array of TDADataTable, Boolean, Boolean) virtual abstract (declared in TDACustomDataAdapter)
Retrieves schema information for all specified TDADataTables, and configures their Fields and Params setup to match the schema from the server. You can perform the same task at design-time for individual data tables by right-clicking the data table component and selecting "Retrieve DataTable Schema" from the context menu.
procedure FillSchema(aTables: array of TDADataTable; aPreserveLookupFields: Boolean; areserveClientCalcFields: Boolean)
Parameters:
- aTables: The specified collection of data tables that should receive the schema information.
- aPreserveLookupFields: Defines whether the collection of lookup fields should be preserved (
true
) or not (false
). By default, this parameter equals false - areserveClientCalcFields: Defines whether the collection of calculated fields should be reserved (
true
) or not (false
). By default, this parameter equals false
FillScripts override (declared in TDABaseDataAdapter)
Retrieves business rules scripts for all specified TDADataTables from the server.
procedure FillScripts(aTables: array of TDADataTable)
Parameters:
- aTables: The specified collection of data tables that should receive business rules scripts.
FillWithDASql (TDADataTable, string, DataParameterArray) overload (declared in TDABaseDataAdapter)
The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood.
Note: works only with .NET servers
procedure FillWithDASql(aTable: TDADataTable; aSQL: string; aParameters: DataParameterArray)
Parameters:
- aTable: Data table that should receive the data from the server.
- aSQL: A DA SQL query string.
- aParameters: Parameters
FillWithDASql (array of TDADataTable, array of string) overload override (declared in TDABaseDataAdapter)
The method fills given data tables with the data from the server with a glance of SQL strings using TableRequestInfoV6 with DA SQL under the hood.
Note: works only with .NET servers
procedure FillWithDASql(aTables: array of TDADataTable; aSQLs: array of string)
Parameters:
- aTables: The specified collection of data tables that should receive the data from the server.
- aSQLs: A DA SQL query strings.
FillWithDASql (array of TDADataTable, array of string, array of DataParameterArray) overload (declared in TDABaseDataAdapter)
The method fills given data tables with the data from the server with a glance of SQL strings using TableRequestInfoV6 with DA SQL under the hood.
Note: works only with .NET servers
procedure FillWithDASql(aTables: array of TDADataTable; aSQLs: array of string; aParameters: array of DataParameterArray)
Parameters:
- aTables: The specified collection of data tables that should receive the data from the server.
- aSQLs: A DA SQL query strings.
- aParameters: The specified collection of parameters
FireAfterApplyUpdates protected (declared in TDABaseDataAdapter)
procedure FireAfterApplyUpdates(aTables: TDADataTableList)
Parameters:
- aTables:
FireBeforeApplyUpdates protected (declared in TDABaseDataAdapter)
procedure FireBeforeApplyUpdates(aTables: TDADataTableList)
Parameters:
- aTables:
FlushSchema (declared in TDABaseDataAdapter)
Deletes schema
procedure FlushSchema
GenerateTableRequestInfoArray_FillWithDASql protected (declared in TDABaseDataAdapter)
function GenerateTableRequestInfoArray_FillWithDASql(aTables: array of TDADataTable; aSQLs: array of string; aParameters: array of DataParameterArray): TableRequestInfoArray_TableRequestInfo
Parameters:
- aTables:
- aSQLs:
- aParameters:
Get_GetDataCall protected virtual (declared in TDACustomDataAdapter)
Describes the server call that will be used to fetch data from the server.
This function is only used for backward compatibility to provide access to this function in the legacy events in the TDADataTable.
function Get_GetDataCall: TDARemoteRequest
Get_GetSchemaCall protected virtual (declared in TDACustomDataAdapter)
Describes the server call that will be used to obtain schema information from the server.
This function is only used for backward compatibility to provide access to this function in the legacy events in the TDADataTable.
function Get_GetSchemaCall: TDARemoteRequest
Get_GetScriptsCall protected virtual (declared in TDACustomDataAdapter)
Gets access to the server call that will be used to download business rules scripts.
This function is only used for backward compatibility to provide access to this function in the legacy events in the TDADataTable
function Get_GetScriptsCall: TDARemoteRequest
Get_UpdateDataCall protected virtual (declared in TDACustomDataAdapter)
Describes the server call that will be used to apply changes back to the server.
This function is only used for backward compatibility to provide access to this function in the legacy events in the TDADataTable.
function Get_UpdateDataCall: TDARemoteRequest
GetLinkedTables (declared in TDACustomDataAdapter)
Returns list of datatables that use given DataAdapter
function GetLinkedTables: TList<TComponent>
GetTableNamesAsCommaText protected (declared in TDABaseDataAdapter)
Produces comma-separated list of table names
function GetTableNamesAsCommaText(aTableArray: array of TDADataTable): ROUTF8String
Parameters:
- aTableArray: source
IsSchemaExist protected (declared in TDABaseDataAdapter)
function IsSchemaExist: Boolean
Notification protected override (declared in TDABaseDataAdapter)
Forwards notification messages to all owned components.
procedure Notification(AComponent: TComponent; Operation: TOperation)
Parameters:
- AComponent: component
- Operation: operation
OnAfterApplyUpdates (declared in TDABaseDataAdapter)
Fires directly after the adapter has finished applying updates for a specific data table.
property OnAfterApplyUpdates: TDAApplyUpdatesEvent read write
delegate: procedure OnAfterApplyUpdates(Sender: TObject; aTable: TDADataTable; const Delta: IDADelta)
OnBeforeApplyUpdates (declared in TDABaseDataAdapter)
Fires directly before the adapter starts applying updates for a specific data table.
property OnBeforeApplyUpdates: TDAApplyUpdatesEvent read write
delegate: procedure OnBeforeApplyUpdates(Sender: TObject; aTable: TDADataTable; const Delta: IDADelta)
OnBeforeProcessFailures (declared in TDABaseDataAdapter)
Fires before the adapter starts processing failures
property OnBeforeProcessFailures: TDABeforeProcessFailuresEvent read write
delegate: procedure OnBeforeProcessFailures(Sender: TObject; aTablesList: TDADataTableList; aFailedDeltas: TDADeltaChangeList; var aFailureBehavior: TDAFailureBehavior)
OnGenerateRecordMessage (declared in TDABaseDataAdapter)
Allows to customize default error message
property OnGenerateRecordMessage: TDAOnGenerateRecordMessage read write
delegate: procedure OnGenerateRecordMessage(Sender: TObject; aChange: TDADeltaChange; ADatatable: TDADataTable; var aMessage: string)
OnShowReconcileRecordInAppUI (declared in TDABaseDataAdapter)
Fires before showing a ReconcileDialogDetails with detailed information about the selected error to the user. If handled, ReconcileDialogDetails will not be shown to the user.
property OnShowReconcileRecordInAppUI: TDAShowReconcileRecordInAppUIEvent read write
delegate: procedure OnShowReconcileRecordInAppUI(Sender: TObject; aChange: TDADeltaChange; aDatatable: TDADataTable; var aHandled: Boolean; var aAction: TDAReconcileDialogAction)
OnShowReconcleDialog (declared in TDABaseDataAdapter)
Fires before showing a ReconcileDialogDetails with detailed information about the selected error to the user.
property OnShowReconcleDialog: TDAShowReconcleDialogEvent read write
delegate: procedure OnShowReconcleDialog(Sender: TObject; var AFailedDeltaList: TDADeltaChangeList; aTableList: TDADataTableList; var aHandled: Boolean)
OnStreamerBeforeFieldValueSerialization
This event allows to change the value of a field before serialization.
property OnStreamerBeforeFieldValueSerialization: TDAReadWriteFieldValue read write
delegate: procedure OnStreamerBeforeFieldValueSerialization(const aField: TDAField; var Value: Variant)
OnStreamerReadDatasetProgress
This event allows to visualize the progress of reading the dataset.
property OnStreamerReadDatasetProgress: TDALDADataStreamerReadDatasetProgress read write
delegate: procedure OnStreamerReadDatasetProgress(Sender: TDALocalDataAdapter; const aDataset: IDADataset; const aCurrent: Integer; const aTotal: Integer)
OnStreamerReadFieldValue
This event allows to change the value of a field after reading.
property OnStreamerReadFieldValue: TDAReadWriteFieldValue read write
delegate: procedure OnStreamerReadFieldValue(const aField: TDAField; var Value: Variant)
OnStreamerWriteDataset
This event is called before a dataset is serialized.
property OnStreamerWriteDataset: TDALDADatasetOperation read write
delegate: procedure OnStreamerWriteDataset(DataStreamer: TDALocalDataAdapter; const Datasetname: string; const Dataset: IDADataset)
OnStreamerWriteDatasetProgress
This event allows to visualize the progress of writing the dataset.
property OnStreamerWriteDatasetProgress: TDALDADataStreamerWriteDatasetProgress read write
delegate: procedure OnStreamerWriteDatasetProgress(Sender: TDALocalDataAdapter; const aDataset: IDADataset; const aCurrent: Integer; const aMaxRecords: Integer)
OnStreamerWriteFieldValue
This event allows to change the value of a field before serialization.
property OnStreamerWriteFieldValue: TDAReadWriteFieldValue read write
delegate: procedure OnStreamerWriteFieldValue(const aField: TDAField; var Value: Variant)
OnStreamerWriteFieldValueEx
This event allows to change the value of a field before serialization.
property OnStreamerWriteFieldValueEx: TDAReadWriteFieldValueEx read write
delegate: procedure OnStreamerWriteFieldValueEx(const aDataset: IDADataset; const aField: TDAField; var Value: Variant)
ReadSchema (declared in TDABaseDataAdapter)
Downloads the Schema from the Data Abstract server .
function ReadSchema(aForceReRead: Boolean): TDAClientSchema
Parameters:
- aForceReRead: Flag indicating whether Schema should be downloaded even if the Schema is already cached in the Schema property
ReadSchemaFromXML protected (declared in TDABaseDataAdapter)
procedure ReadSchemaFromXML(aValue: ROUTF8String)
Parameters:
- aValue:
ReconcileProvider (declared in TDABaseDataAdapter)
Reconcile Dialog provider.
property ReconcileProvider: TDABaseReconcileProvider read write
ROFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure ROFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
RORemoveFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure RORemoveFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
Schema (declared in TDABaseDataAdapter)
Server's schema.
property Schema: TDAClientSchema read
SendRemoveNotification protected (declared in TROComponent)
Forwards notification messages to all owned components.
procedure SendRemoveNotification(aComponent: TComponent)
Parameters:
- aComponent: component
ServiceInstance
The service instance currently in use. When the ServiceName is set, this property will be initialized when the first call is done. It is also possible to assign your own instance.
property ServiceInstance: IDataAbstractLocalServiceAccess read write
ServiceName
Name of the local service that holds the schema and business logic.
property ServiceName: string read write
SessionID
The client ID that the service will get while running.
property SessionID: TGuid read write
UpdateData protected override
Applies changes back to the server
procedure UpdateData(aDeltaList: IDeltaArray)
Parameters:
- aDeltaList: Delta list.
AutoFillScripts (declared in TDABaseDataAdapter)
Autofills business rules scripts at opening tables
property AutoFillScripts: Boolean read write
CacheSchema protected (declared in TDABaseDataAdapter)
Toggles whether the data adapter will maintain a local cache of the schema retrieved from the server with subsequent calls to the Schema property. If set to true, the adapter will download the schema the first time the Schema property is accessed, and subsequent accesses will return the same schema instance. If set to false (default), the schema will be re-downloaded from the server every time. You can flush any cached schema by setting this property to false and then immediately back to true, or by calling the FlushSchema method. Set this property to false when you expect frequent changes in the schema information, or when you want to update data tables to a changed server, at design time. Set it to true you want your application to only obtain the schema once and don't expect the server-side schema to change while the application is running.
property CacheSchema: Boolean read write
DataStreamer protected (declared in TDACustomDataAdapter)
Defines the type of data streamer to be used for reading and writing data from and to the network. The type of streamer assigned here must match the streamer used on the ServiceDataStreamer property of the sever in the descendant classes.
property DataStreamer: TDADataStreamer read write
DynamicSelect (declared in TDABaseDataAdapter)
Flag indicating whether Data Adapter should perform queries using the Dynamic Select feature.
property DynamicSelect: Boolean read write
FailureBehavior (declared in TDABaseDataAdapter)
Manages how TDABaseRemoteDataAdapter behaves when an error is encountered.
property FailureBehavior: TDAFailureBehavior read write
ReconcileProvider (declared in TDABaseDataAdapter)
Reconcile Dialog provider.
property ReconcileProvider: TDABaseReconcileProvider read write
Schema (declared in TDABaseDataAdapter)
Server's schema.
property Schema: TDAClientSchema read
ServiceInstance
The service instance currently in use. When the ServiceName is set, this property will be initialized when the first call is done. It is also possible to assign your own instance.
property ServiceInstance: IDataAbstractLocalServiceAccess read write
ServiceName
Name of the local service that holds the schema and business logic.
property ServiceName: string read write
SessionID
The client ID that the service will get while running.
property SessionID: TGuid read write
constructor Create (TComponent) override (declared in TDABaseDataAdapter)
Standard component constructor
constructor Create(aOwner: TComponent)
Parameters:
- aOwner: Owner
constructor Create (IDataAbstractLocalServiceAccess) reintroduce overload
Creates a new instance and initializes the ServiceInstance property.
constructor Create(const aServiceInstance: IDataAbstractLocalServiceAccess)
Parameters:
- aServiceInstance: Data Service instance that will be used to execute the TDALocalDataAdapter methods
constructor Create (string) reintroduce overload
Creates a new instance and initializes the ServiceName property.
constructor Create(const aServiceName: string)
Parameters:
- aServiceName: Name of the Data Service that will be used to execute the TDALocalDataAdapter methods
ApplyUpdates override (declared in TDABaseDataAdapter)
Applies local updates, which are represented in the collection of data tables, back to the server and returns true if the updates were successfully applied on the server. Otherwise returns false.
function ApplyUpdates(aTables: array of TDADataTable; aRefetchAll: Boolean): Boolean
Parameters:
- aTables: Input collection of data tables with updates that should be applied on the server.
- aRefetchAll:
True
: the data tables reopen after applying updates on the server.False
: they don't reopen. By default, this parameter equalsFalse
.
Assign override (declared in TDABaseDataAdapter)
Copies the contents of another, similar object.
procedure Assign(Source: TPersistent)
Parameters:
- Source: Instance whose properties will be copied
CheckProperties override
procedure CheckProperties(ACheckOnlyDataStreamer: Boolean)
Parameters:
- ACheckOnlyDataStreamer:
CreateTableRequestInfo protected (declared in TDABaseDataAdapter)
Generates TableRequestInfo based on given parameters.
function CreateTableRequestInfo(aTable: TDADataTable; aIncludeSchema: Boolean; aDynamicWhereExpression: TDAWhereExpression): TableRequestInfo
Parameters:
- aTable: datatable
- aIncludeSchema: include schema
- aDynamicWhereExpression: dynamic where expression
Execute (string): Integer overload (declared in TDABaseDataAdapter)
Executes the command with the given name and returns the number of affected rows.
function Execute(aCommandName: string): Integer
Parameters:
- aCommandName: Name of the command that is declared in the schema.
Execute (string, array of Variant): Integer overload (declared in TDABaseDataAdapter)
Executes the command with the given input parameters and returns the number of affected rows.
function Execute(aCommandName: string; aInputParameters: array of Variant): Integer
Parameters:
- aCommandName: Name of the command that is declared in the schema.
- aInputParameters: Specified array with input parameters.
Execute (string, DataParameterArray): Integer overload (declared in TDABaseDataAdapter)
Executes the command with the given name and input parameters and returns the number of affected rows.
function Execute(aCommandName: string; aInputParameters: DataParameterArray): Integer
Parameters:
- aCommandName: Name of the command that is declared in the schema.
- aInputParameters: Specified array with input parameters.
Execute (string, DataParameterArray, DataParameterArray): Integer overload (declared in TDABaseDataAdapter)
Executes the command with the given name and input parameters and returns the number of affected rows.
function Execute(aCommandName: string; aInputParameters: DataParameterArray; out aOutputParameters: DataParameterArray): Integer
Parameters:
- aCommandName: Name of the command that is declared in the schema.
- aInputParameters: Specified array with input parameters.
- aOutputParameters: Specified array with output parameters.
Fill (array of TDADataTable, Boolean, Boolean, Boolean) overload override (declared in TDABaseDataAdapter)
Retrieves data from the server for all of the specified TDADataTables. In most scenarios you will not call this method yourself, but simply open the respective data table, causing data to be retrieved automatically. However, calling Fill yourself provides additional flexibility, including the option to fill multiple data tables at the same time, avoiding unnecessary server round-trips.
procedure Fill(aTables: array of TDADataTable; aSaveCursor: Boolean; aIncludeSchema: Boolean; aAppendMode: Boolean)
Parameters:
- aTables: The specified collection of data tables that should receive the data from the server.
- aSaveCursor: Defines whether the cursors that are related with the collection of data tables should be saved (true) or not (false).
- aIncludeSchema: Defines whether the schema should be included while creating table request information (true) or not (false).
- aAppendMode: Defines whether the AppendMode in the related TDATableOptionsArray collection should be set (true) or not (false). By default, this parameter equals false.
Fill (array of TDADataTable, TableRequestInfoArray_TableRequestInfo, Boolean, Boolean, Boolean) overload (declared in TDABaseDataAdapter)
Retrieves data from the server for all of the specified TDADataTables. In most scenarios you will not call this method yourself, but simply open the respective data table, causing data to be retrieved automatically. However, calling Fill yourself provides additional flexibility, including the option to fill multiple data tables at the same time, avoiding unnecessary server round-trips.
procedure Fill(aTables: array of TDADataTable; aTableRequestInfoArray: TableRequestInfoArray_TableRequestInfo; aSaveCursor: Boolean; aIncludeSchema: Boolean; aAppendMode: Boolean)
Parameters:
- aTables: The specified collection of data tables that should receive the data from the server.
- aTableRequestInfoArray: The specified collection of TableRequestInfo that contains additional parameters.
- aSaveCursor: Defines whether the cursors that are related with the collection of data tables should be saved (true) or not (false).
- aIncludeSchema: Defines whether the schema should be included while creating table request information (true) or not (false).
- aAppendMode: Defines whether the AppendMode in the related TDATableOptionsArray collection should be set (true) or not (false). By default, this parameter equals false.
Fill (array of TDADataTable, array of TDAWhereExpression, Boolean, Boolean, Boolean) overload (declared in TDABaseDataAdapter)
Retrieves data from the server for all of the specified TDADataTables. In most scenarios you will not call this method yourself, but simply open the respective data table, causing data to be retrieved automatically. However, calling Fill yourself provides additional flexibility, including the option to fill multiple data tables at the same time, avoiding unnecessary server round-trips.
procedure Fill(aTables: array of TDADataTable; aWhereClauses: array of TDAWhereExpression; aSaveCursor: Boolean; aIncludeSchema: Boolean; aAppendMode: Boolean)
Parameters:
- aTables: The specified collection of data tables that should receive the data from the server.
- aWhereClauses: The specified collection of where clasuses that should receive the data from the server.
- aSaveCursor: Defines whether the cursors that are related with the collection of data tables should be saved (true) or not (false).
- aIncludeSchema: Defines whether the schema should be included while creating table request information (true) or not (false).
- aAppendMode: Defines whether the AppendMode in the related TDATableOptionsArray collection should be set (true) or not (false). By default, this parameter equals false.
FillSchema (array of TDADataTable, Boolean, Boolean) override (declared in TDABaseDataAdapter)
Retrieves schema information for all of the specified TDADataTable, and configures their Fields and Params setup to match the schema from the server. You can perform the same task at design-time for individual data tables by right-clicking the data table component and selecting "Retrieve DataTable Schema" from the context menu.
procedure FillSchema(aTables: array of TDADataTable; aPreserveLookupFields: Boolean; aPreserveClientCalcFields: Boolean)
Parameters:
- aTables:
- aPreserveLookupFields:
- aPreserveClientCalcFields:
FillSchema (array of TDADataTable, Boolean, Boolean) virtual abstract (declared in TDACustomDataAdapter)
Retrieves schema information for all specified TDADataTables, and configures their Fields and Params setup to match the schema from the server. You can perform the same task at design-time for individual data tables by right-clicking the data table component and selecting "Retrieve DataTable Schema" from the context menu.
procedure FillSchema(aTables: array of TDADataTable; aPreserveLookupFields: Boolean; areserveClientCalcFields: Boolean)
Parameters:
- aTables: The specified collection of data tables that should receive the schema information.
- aPreserveLookupFields: Defines whether the collection of lookup fields should be preserved (
true
) or not (false
). By default, this parameter equals false - areserveClientCalcFields: Defines whether the collection of calculated fields should be reserved (
true
) or not (false
). By default, this parameter equals false
FillScripts override (declared in TDABaseDataAdapter)
Retrieves business rules scripts for all specified TDADataTables from the server.
procedure FillScripts(aTables: array of TDADataTable)
Parameters:
- aTables: The specified collection of data tables that should receive business rules scripts.
FillWithDASql (TDADataTable, string, DataParameterArray) overload (declared in TDABaseDataAdapter)
The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood.
Note: works only with .NET servers
procedure FillWithDASql(aTable: TDADataTable; aSQL: string; aParameters: DataParameterArray)
Parameters:
- aTable: Data table that should receive the data from the server.
- aSQL: A DA SQL query string.
- aParameters: Parameters
FillWithDASql (array of TDADataTable, array of string) overload override (declared in TDABaseDataAdapter)
The method fills given data tables with the data from the server with a glance of SQL strings using TableRequestInfoV6 with DA SQL under the hood.
Note: works only with .NET servers
procedure FillWithDASql(aTables: array of TDADataTable; aSQLs: array of string)
Parameters:
- aTables: The specified collection of data tables that should receive the data from the server.
- aSQLs: A DA SQL query strings.
FillWithDASql (array of TDADataTable, array of string, array of DataParameterArray) overload (declared in TDABaseDataAdapter)
The method fills given data tables with the data from the server with a glance of SQL strings using TableRequestInfoV6 with DA SQL under the hood.
Note: works only with .NET servers
procedure FillWithDASql(aTables: array of TDADataTable; aSQLs: array of string; aParameters: array of DataParameterArray)
Parameters:
- aTables: The specified collection of data tables that should receive the data from the server.
- aSQLs: A DA SQL query strings.
- aParameters: The specified collection of parameters
FireAfterApplyUpdates protected (declared in TDABaseDataAdapter)
procedure FireAfterApplyUpdates(aTables: TDADataTableList)
Parameters:
- aTables:
FireBeforeApplyUpdates protected (declared in TDABaseDataAdapter)
procedure FireBeforeApplyUpdates(aTables: TDADataTableList)
Parameters:
- aTables:
FlushSchema (declared in TDABaseDataAdapter)
Deletes schema
procedure FlushSchema
GenerateTableRequestInfoArray_FillWithDASql protected (declared in TDABaseDataAdapter)
function GenerateTableRequestInfoArray_FillWithDASql(aTables: array of TDADataTable; aSQLs: array of string; aParameters: array of DataParameterArray): TableRequestInfoArray_TableRequestInfo
Parameters:
- aTables:
- aSQLs:
- aParameters:
Get_GetDataCall protected virtual (declared in TDACustomDataAdapter)
Describes the server call that will be used to fetch data from the server.
This function is only used for backward compatibility to provide access to this function in the legacy events in the TDADataTable.
function Get_GetDataCall: TDARemoteRequest
Get_GetSchemaCall protected virtual (declared in TDACustomDataAdapter)
Describes the server call that will be used to obtain schema information from the server.
This function is only used for backward compatibility to provide access to this function in the legacy events in the TDADataTable.
function Get_GetSchemaCall: TDARemoteRequest
Get_GetScriptsCall protected virtual (declared in TDACustomDataAdapter)
Gets access to the server call that will be used to download business rules scripts.
This function is only used for backward compatibility to provide access to this function in the legacy events in the TDADataTable
function Get_GetScriptsCall: TDARemoteRequest
Get_UpdateDataCall protected virtual (declared in TDACustomDataAdapter)
Describes the server call that will be used to apply changes back to the server.
This function is only used for backward compatibility to provide access to this function in the legacy events in the TDADataTable.
function Get_UpdateDataCall: TDARemoteRequest
GetLinkedTables (declared in TDACustomDataAdapter)
Returns list of datatables that use given DataAdapter
function GetLinkedTables: TList<TComponent>
GetTableNamesAsCommaText protected (declared in TDABaseDataAdapter)
Produces comma-separated list of table names
function GetTableNamesAsCommaText(aTableArray: array of TDADataTable): ROUTF8String
Parameters:
- aTableArray: source
IsSchemaExist protected (declared in TDABaseDataAdapter)
function IsSchemaExist: Boolean
Notification protected override (declared in TDABaseDataAdapter)
Forwards notification messages to all owned components.
procedure Notification(AComponent: TComponent; Operation: TOperation)
Parameters:
- AComponent: component
- Operation: operation
ReadSchema (declared in TDABaseDataAdapter)
Downloads the Schema from the Data Abstract server .
function ReadSchema(aForceReRead: Boolean): TDAClientSchema
Parameters:
- aForceReRead: Flag indicating whether Schema should be downloaded even if the Schema is already cached in the Schema property
ReadSchemaFromXML protected (declared in TDABaseDataAdapter)
procedure ReadSchemaFromXML(aValue: ROUTF8String)
Parameters:
- aValue:
ROFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure ROFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
RORemoveFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure RORemoveFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
SendRemoveNotification protected (declared in TROComponent)
Forwards notification messages to all owned components.
procedure SendRemoveNotification(aComponent: TComponent)
Parameters:
- aComponent: component
UpdateData protected override
Applies changes back to the server
procedure UpdateData(aDeltaList: IDeltaArray)
Parameters:
- aDeltaList: Delta list.
OnAfterApplyUpdates (declared in TDABaseDataAdapter)
Fires directly after the adapter has finished applying updates for a specific data table.
property OnAfterApplyUpdates: TDAApplyUpdatesEvent read write
delegate: procedure OnAfterApplyUpdates(Sender: TObject; aTable: TDADataTable; const Delta: IDADelta)
OnBeforeApplyUpdates (declared in TDABaseDataAdapter)
Fires directly before the adapter starts applying updates for a specific data table.
property OnBeforeApplyUpdates: TDAApplyUpdatesEvent read write
delegate: procedure OnBeforeApplyUpdates(Sender: TObject; aTable: TDADataTable; const Delta: IDADelta)
OnBeforeProcessFailures (declared in TDABaseDataAdapter)
Fires before the adapter starts processing failures
property OnBeforeProcessFailures: TDABeforeProcessFailuresEvent read write
delegate: procedure OnBeforeProcessFailures(Sender: TObject; aTablesList: TDADataTableList; aFailedDeltas: TDADeltaChangeList; var aFailureBehavior: TDAFailureBehavior)
OnGenerateRecordMessage (declared in TDABaseDataAdapter)
Allows to customize default error message
property OnGenerateRecordMessage: TDAOnGenerateRecordMessage read write
delegate: procedure OnGenerateRecordMessage(Sender: TObject; aChange: TDADeltaChange; ADatatable: TDADataTable; var aMessage: string)
OnShowReconcileRecordInAppUI (declared in TDABaseDataAdapter)
Fires before showing a ReconcileDialogDetails with detailed information about the selected error to the user. If handled, ReconcileDialogDetails will not be shown to the user.
property OnShowReconcileRecordInAppUI: TDAShowReconcileRecordInAppUIEvent read write
delegate: procedure OnShowReconcileRecordInAppUI(Sender: TObject; aChange: TDADeltaChange; aDatatable: TDADataTable; var aHandled: Boolean; var aAction: TDAReconcileDialogAction)
OnShowReconcleDialog (declared in TDABaseDataAdapter)
Fires before showing a ReconcileDialogDetails with detailed information about the selected error to the user.
property OnShowReconcleDialog: TDAShowReconcleDialogEvent read write
delegate: procedure OnShowReconcleDialog(Sender: TObject; var AFailedDeltaList: TDADeltaChangeList; aTableList: TDADataTableList; var aHandled: Boolean)
OnStreamerBeforeFieldValueSerialization
This event allows to change the value of a field before serialization.
property OnStreamerBeforeFieldValueSerialization: TDAReadWriteFieldValue read write
delegate: procedure OnStreamerBeforeFieldValueSerialization(const aField: TDAField; var Value: Variant)
OnStreamerReadDatasetProgress
This event allows to visualize the progress of reading the dataset.
property OnStreamerReadDatasetProgress: TDALDADataStreamerReadDatasetProgress read write
delegate: procedure OnStreamerReadDatasetProgress(Sender: TDALocalDataAdapter; const aDataset: IDADataset; const aCurrent: Integer; const aTotal: Integer)
OnStreamerReadFieldValue
This event allows to change the value of a field after reading.
property OnStreamerReadFieldValue: TDAReadWriteFieldValue read write
delegate: procedure OnStreamerReadFieldValue(const aField: TDAField; var Value: Variant)
OnStreamerWriteDataset
This event is called before a dataset is serialized.
property OnStreamerWriteDataset: TDALDADatasetOperation read write
delegate: procedure OnStreamerWriteDataset(DataStreamer: TDALocalDataAdapter; const Datasetname: string; const Dataset: IDADataset)
OnStreamerWriteDatasetProgress
This event allows to visualize the progress of writing the dataset.
property OnStreamerWriteDatasetProgress: TDALDADataStreamerWriteDatasetProgress read write
delegate: procedure OnStreamerWriteDatasetProgress(Sender: TDALocalDataAdapter; const aDataset: IDADataset; const aCurrent: Integer; const aMaxRecords: Integer)
OnStreamerWriteFieldValue
This event allows to change the value of a field before serialization.
property OnStreamerWriteFieldValue: TDAReadWriteFieldValue read write
delegate: procedure OnStreamerWriteFieldValue(const aField: TDAField; var Value: Variant)
OnStreamerWriteFieldValueEx
This event allows to change the value of a field before serialization.
property OnStreamerWriteFieldValueEx: TDAReadWriteFieldValueEx read write
delegate: procedure OnStreamerWriteFieldValueEx(const aDataset: IDADataset; const aField: TDAField; var Value: Variant)