IDataAbstractService

Overview

The IDataAbstractService interface provides methods that clients can use to read data stored in a database, to apply updates, execute commands and more.

Location


Required Methods


ExecuteCommand

Executes the given command, initializing its parameters with the values contained in the given array. The command name needs to reference one of the commands in the schema associated with this service.

To enable the execution of commands from the client, set the AllowExecuteCommands property of your TDataAbstractService to true and ensure that all published Commands in your schema are safe for execution.

function ExecuteCommand(const aCommandName: ROUTF8String; const aParameterArray: DataParameterArray): Integer

Parameters:

  • aCommandName: Command name in the Schema
  • aParameterArray: List of input paramaters

ExecuteCommandEx

Executes the given command, initializing its parameters with the values contained in the given array. The command name needs to reference one of the commands in the schema associated with this service.

To enable the execution of commands from the client, set the AllowExecuteCommands property of your TDataAbstractService to true and ensure that all published Commands in your schema are safe for execution.

function ExecuteCommandEx(const aCommandName: ROUTF8String; const aInputParameters: DataParameterArray; out aOutputParameters: DataParameterArray): Integer

Parameters:

  • aCommandName: Command name in the Schema
  • aInputParameters: List of input paramaters
  • aOutputParameters: List of output paramaters

GetCommandSchema

Returns the definitions of the schema commands identified by the names passed through the parameter.

function GetCommandSchema(const aCommandNameArray: StringArray): ROUTF8String

Parameters:

  • aCommandNameArray: specifies the name or names of the commands

GetData

Returns a stream that includes the data of all data tables indicated in the first parameter. Each data table can return a different number of rows, or be opened using specific parameters that are passed as TableInfoRequest in the second parameter.

This method provides the primary means of fetching data from the server to the client and is invoked when the Fill method is called on a client-side TDARemoteDataAdapter component.

function GetData(const aTableNameArray: StringArray; const aTableRequestInfoArray: TableRequestInfoArray): Binary

Parameters:

  • aTableNameArray: specifies the name or names of the tables to retrieve
  • aTableRequestInfoArray: specifies one or several TableRequestInfo with additional options

GetDatasetScripts

Returns client-side Business Rules scripts in xml format

function GetDatasetScripts(const DatasetNames: ROUTF8String): ROUTF8String

Parameters:

  • DatasetNames: List of dataset names which should be devided by comma

GetSchema

Returns the schema referenced by the service to the calling client application, as XML.

function GetSchema(const aFilter: ROUTF8String): ROUTF8String

Parameters:

  • aFilter: not used

GetTableSchema

Returns the definitions of the schema data tables identified by the names passed through the parameter.

function GetTableSchema(const aTableNameArray: StringArray): ROUTF8String

Parameters:

  • aTableNameArray: specifies the name or names of the tables

RegisterForDataChangeNotification

Registers a new table which will be refreshed automatically after other users apply changes to it.

This method isn't implemented yet!

procedure RegisterForDataChangeNotification(const aTableName: ROUTF8String)

Parameters:

  • aTableName: table name

SQLExecuteCommand

Executes the passed SQL statement as a command.

Note: Allowing clients to execute arbitrary SQL statements poses a security risk and should only be allowed with caution and when using proper authentication mechanisms to prevent anonymous users from making such calls.

The AllowExecuteCommands property is set to false by default to prevent SQL commands from being executed.

function SQLExecuteCommand(const aSQLText: ROUTF8String): Integer

Parameters:

  • aSQLText: SQL statement

SQLExecuteCommandEx

Executes the passed SQL statement as a command. Supports Dynamic Where feature.

Note: Allowing clients to execute arbitrary SQL statements poses a security risk and should only be allowed with caution and when using proper authentication mechanisms to prevent anonymous users from making such calls.

The AllowExecuteCommands property is set to false by default to prevent SQL commands from being executed.

function SQLExecuteCommandEx(const aSQLText: ROUTF8String; const aDynamicWhereXML: UnicodeString): Integer

Parameters:

  • aSQLText: SQL statement
  • aDynamicWhereXML: xml with Dynamic Where condition

SQLGetData

Executes the passed SQL statement and returns the record set as streamed data table.

Note: Allowing clients to execute arbitrary SQL statements poses a security risk and should only be allowed with caution and when using proper authentication mechanisms to prevent anonymous users from making such calls.

The AllowExecuteCommands property is set to false by default to prevent SQL commands from being executed.

function SQLGetData(const aSQLText: ROUTF8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer): Binary

Parameters:

  • aSQLText: SQL statement
  • aIncludeSchema: Specifies that response should contain schema
  • aMaxRecords: Specifies the maximum number of records to retrieve from the server. A value of -1 (default) will retrieve all records.

SQLGetDataEx

Executes the passed SQL statement and returns the record set as streamed data table. Supports Dynamic Where feature. Note: Allowing clients to execute arbitrary SQL statements poses a security risk and should only be allowed with caution and when using proper authentication mechanisms to prevent anonymous users from making such calls.

The AllowExecuteCommands property is set false by default, to prevent SQL commands from being executed.

function SQLGetDataEx(const aSQLText: ROUTF8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer; const aDynamicWhereXML: UnicodeString): Binary

Parameters:

  • aSQLText: SQL statement
  • aIncludeSchema: Specifies that response should contain schema
  • aMaxRecords: Specifies the maximum number of records to retrieve from the server. A value of -1 (default) will retrieve all records.
  • aDynamicWhereXML: xml with Dynamic Where condition

UnregisterForDataChangeNotification

Unregisters a table that was registered by the RegisterForDataChangeNotification method.

This method isn't implemented yet!

procedure UnregisterForDataChangeNotification(const aTableName: ROUTF8String)

Parameters:

  • aTableName: table name

UpdateData

Applies the deltas encoded in the passed stream to the database and returns a stream that includes status information about the applied updates and possibly refreshed data for the client.

This method provides the primary means of applying data updates from the client back to the server and is invoked when the Update method is called on a client-side TDARemoteDataAdapter component.

function UpdateData(const aDelta: Binary): Binary

Parameters:

  • aDelta: delta list to process