Executing Commands That Do Not Return Records

From RAD Studio
Jump to: navigation, search

Go Up to Using dbExpress Components Index


You can use a dbExpress dataset even if the query or stored procedure it represents does not return any records. Such commands include statements that use Data Definition Language (DDL) or Data Manipulation Language (DML) statements other than SELECT statements (For example, INSERT, DELETE, UPDATE, CREATE INDEX, and ALTER TABLE commands do not return any records). The language used in commands is server-specific, but usually compliant with the SQL-92 standard for the SQL language.

The SQL command you execute must be acceptable to the server you are using. Unidirectional datasets neither evaluate the SQL nor execute it. They merely pass the command to the server for execution.

Note: If the command does not return any records, you do not need to use a unidirectional dataset at all, because there is no need for the dataset methods that provide access to a set of records. The SQL connection component that connects to the database server can be used directly to execute a command on the server. See Sending Commands to the Server for details.

The following topics discuss how to create and execute a command that does not return any records:

In addition, the topic, Creating and modifying server metadata, discusses some of the SQL commands that do not return datasets:

See Also