Using TQuery

From RAD Studio
Jump to: navigation, search

Go Up to Using BDE-enabled datasets Index

Attention: The Borland Database Engine (BDE) has been deprecated, so it will not be enhanced. For instance, BDE will never have Unicode support. You should not undertake new development with BDE. Consider migrating your existing database applications from BDE to dbExpress.

TQuery represents a single Data Definition Language (DDL) or Data Manipulation Language (DML) statement (for example, a SELECT, INSERT, DELETE, UPDATE, CREATE INDEX, or ALTER TABLE command). The language used in commands is server-specific, but usually compliant with the SQL-92 standard for the SQL language. TQuery implements all of the basic functionality introduced by TDataSet, as well as all of the special features typical of query-type datasets.

Because TQuery is a BDE-enabled dataset, it must usually be associated with a database and a session. (The one exception is when you use the TQuery for a heterogeneous query.) You specify the SQL statement for the query by setting the SQL property.

A TQuery component can access data in:

  • Paradox or dBASE tables, using Local SQL, which is part of the BDE. Local SQL is a subset of the SQL-92 specification. Most DML is supported and enough DDL syntax to work with these types of tables.
  • Local InterBase Server databases, using the InterBase engine. For information on InterBase's SQL-92 standard SQL syntax support and extended syntax support, see the InterBase Language Reference.
  • Databases on remote database servers such as Oracle, Sybase, MS-SQL Server, Informix, DB2, and InterBase. You must install the appropriate SQL Link driver and client software (vendor-supplied) specific to the database server to access a remote server. Any standard SQL syntax supported by these servers is allowed. For information on SQL syntax, limitations, and extensions, see the documentation for your particular server.

The following topics discuss features that are unique to TQuery components (as opposed to other query-type datasets):

See Also