TDASQLCommand

Overview

The TDASQLCommand class represents an individual command defined in a schema.

The class also forms the base for TDADataset, which represent datasets (or data tables).

Commands can be used to perform inserts/updates/deletes for data tables in the same schema, or can perform unrelated database actions such as running stored procedures or SQL scripts.

You will usually not create instances of this class directly, but define commands in Schema Modeler or access them through the Commands property of the TDASchema component.

Location

 

constructor Create  override

Creates a new instance.

constructor Create(Collection: TCollection)

Parameters:

  • Collection: owner collection.

Assign  override

Copies data from a given source.

procedure Assign(aSource: TPersistent)

Parameters:

  • aSource: Instance whose properties will be copied

BusinessRulesClient

Business rule script (client-side)

property BusinessRulesClient: TDAClientBusinessRuleScript read write

BusinessRulesServer

Business rule script (server-side)

property BusinessRulesServer: TDABusinessRuleScript read write

CustomAttributes

Custom attributes of the sql command.

property CustomAttributes: TStrings read write

Description

Describes the command. This property will not be used by the Data Abstract library, but can be filled with description text for documentation purposes when defining the command in Schema Modeler.

property Description: string read write

DynamicWhereXML

Dynamic Where xml

property DynamicWhereXML: CDATAString read write

GetDisplayName  protected override

Returns the name of the sql command as it appears in the collection editor.

function GetDisplayName: string

IsPublic

property IsPublic: Boolean read write

Name

Sets the name that uniquely identifies this command. This name can be the name of the underlying stored procedure, or any human-readable name that describes the purpose of the command.

property Name: string read write

ParamByName

Locates a specific parameter defined for the command, 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

Provides access to the list of parameters for this command or data table. Please refer to the Command and Data Table Parameters help topic for more information on this topic.

property Params: TDAParamCollection read write

SetDisplayName  protected override

Sets the name of the command as it appears in the collection editor.

procedure SetDisplayName(const Value: string)

Parameters:

  • Value: value for the Name property

SQLCommandCollection

References the collection that this command belongs to. Usually, this will be the Commands property of the TDASchema that this command is defined in.

property SQLCommandCollection: TDASQLCommandCollection read write

Statements

Holds the statements defined for this command or dataset. Please refer to the Cross Database Support help topic for more details on statements.

property Statements: TDAStatementCollection read write

 

BusinessRulesClient

Business rule script (client-side)

property BusinessRulesClient: TDAClientBusinessRuleScript read write

BusinessRulesServer

Business rule script (server-side)

property BusinessRulesServer: TDABusinessRuleScript read write

CustomAttributes

Custom attributes of the sql command.

property CustomAttributes: TStrings read write

Description

Describes the command. This property will not be used by the Data Abstract library, but can be filled with description text for documentation purposes when defining the command in Schema Modeler.

property Description: string read write

DynamicWhereXML

Dynamic Where xml

property DynamicWhereXML: CDATAString read write

IsPublic

property IsPublic: Boolean read write

Name

Sets the name that uniquely identifies this command. This name can be the name of the underlying stored procedure, or any human-readable name that describes the purpose of the command.

property Name: string read write

Params

Provides access to the list of parameters for this command or data table. Please refer to the Command and Data Table Parameters help topic for more information on this topic.

property Params: TDAParamCollection read write

SQLCommandCollection

References the collection that this command belongs to. Usually, this will be the Commands property of the TDASchema that this command is defined in.

property SQLCommandCollection: TDASQLCommandCollection read write

Statements

Holds the statements defined for this command or dataset. Please refer to the Cross Database Support help topic for more details on statements.

property Statements: TDAStatementCollection read write

 

constructor Create  override

Creates a new instance.

constructor Create(Collection: TCollection)

Parameters:

  • Collection: owner collection.

Assign  override

Copies data from a given source.

procedure Assign(aSource: TPersistent)

Parameters:

  • aSource: Instance whose properties will be copied

GetDisplayName  protected override

Returns the name of the sql command as it appears in the collection editor.

function GetDisplayName: string

ParamByName

Locates a specific parameter defined for the command, 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

SetDisplayName  protected override

Sets the name of the command as it appears in the collection editor.

procedure SetDisplayName(const Value: string)

Parameters:

  • Value: value for the Name property

Descendants

See Also