IDASQLCommand

From RemObjects Software

Jump to: navigation, search

This is a Data Abstract Architecture entry
Feel free to add your notes to this topic below.



Overview

The IDASQLCommand interface is used to represents an individual command to be executed on the database. Commands are usually obtained via IDAConnection.NewCommand or TDASchema.NewCommand and will be implemented by different classes depending on the database driver you are using.

File

  • uDAInterfaces

Hierarchy

  • IDASQLCommand

Properties

Property
Type
Description
Name String Returns a human-readable name for the command. For commands obtained through a TDASchema component, this will be the name that the command (or data table) was defined under in Schema Modeler. When obtaining a command from an IDAConnection, the name can be specified in the call to NewCommand or NewDataset.
Params TDAParamCollection Provides access to the list of parameters defined for the command.
Prepared Boolean 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.
SQL String Defines the SQL statement to be executed.
Where TDAWhere Provides access to a structured WHERE clause that can be modified and expanded in code. The WHERE clause is represented by an instance of the TDAWhere class, which provides methods to dynamically build and extend the WHERE clause in code. Upon execution of the command, the appropriate WHERE statement will automatically be generated and appended to the original SQL statement.


Methods

Method
Description
Execute Executes the the specified SQL statement on the server.
ParamByName Locates a specific parameter defined for the command, based on its name. If no matching parameter is defined, an exception will be raised.
RefreshParams Refreshes the list of parameters defined for the command based on the actual parameter names found in the SQL statement and Where clause.


See Also


Product: RemObjects Data Abstract
Current version: Data Abstract 'Vinci' (5.0)

ListsGlossaryFeaturesHow ToDriversComponentsToolsSamplesArticlesArchitectureIssues

Personal tools