Executing Commands

Executing commands against a database is done using an implementation of the IDbCommand interface, such as the SqlCommand, OleDBCommand, and BdpCommand objects. Typically, this object sends SQL statements to the database to execute through the IDbCommand.CommandText property. This could be a SELECT, INSERT, UPDATE, DELETE, or other similar SQL commands. When using the IDbCommand object against a non-SQL data provider, CommandText can hold non-SQL statements, as long as the information being sent can be represented as a String.

The IDbCommand Interface

The IDbCommand interface properties and methods are discussed in Tables 19.1 and 19.2, respectively.

Table 19.1. IDbCommand Properties
PropertyDescription
CommandTextContains the ...

Get Delphi for .NET Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.