RAD Studio
ContentsIndex
PreviousUpNext
Using TQuery

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. See the local SQL help, LOCALSQL.HLP, for details on supported SQL syntax.
  • 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):  

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!