RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TUpdateSQL.Query Property

Returns the query object used to perform a specified kind of update.

Pascal
property Query [UpdateKind: TUpdateKind]: TQuery;
C++
__property TQuery Query[TUpdateKind UpdateKind];

Query is a read-only property that provides a reference to the internal TQuery that executes the SQL that applies the cached data updates. Use properties and methods of TQuery to work with this reference. 

Using one of the TUpdateKind constants as an index for the Query property, the internal TQuery object will have the SQL specified in the corresponding update SQL property: DeleteSQL, InsertSQL, or ModifySQL. UpdateKind can be one of the following:

Value 
Meaning 
ukDelete  
Return the query object used to execute DELETE statements (DeleteSQL).  
ukInsert  
Return the query object used to execute INSERT statements (InsertSQL).  
ukModify  
Return the query object used to execute UPDATE statements (ModifySQL).  

Each query object executes a particular kind of SQL statement. The contents of the SQL statements executed by these objects can be accessed directly using the ModifySQL, InsertSQL, and DeleteSQL properties. 

The main purpose of Query is to provide a a way for an application to set the properties for an update query object or to call the query object's methods.

Note: If a particular kind of update statement is not provided, then its corresponding query object is nil (Delphi) or NULL (C++). For example, if an application does not provide an SQL statement for the DeleteSQL property, then setting Query[ukDelete] returns nil (Delphi) or NULL (C++).
 

 

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