Bde.DBTables.TQuery.RequestLive

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property RequestLive: Boolean read FRequestLive write FRequestLive default False;

C++

__property bool RequestLive = {read=FRequestLive, write=FRequestLive, default=0};

Properties

Type Visibility Source Unit Parent
property published
Bde.DBTables.pas
Bde.DBTables.hpp
Bde.DBTables TQuery

Description

Requests an updatable query result set from the database.

RequestLive is a request that a SELECT query returns an updatable (or live) or read-only result set from the database back-end. A false value for RequestLive (the default) causes the result set to always be read-only. No request is made to the database back-end to return an updatable result set. A true value for RequestLive is a request to database back-end to return an updatable result set. An updatable result set can be made available to the application's user for direct data editing through visual data controls.

A true value for RequestLive is a request for an updatable result set. It does not guarantee that the database back-end will return an updatable result set. See the documentation for the specific database system used for the criteria needed for a live query result set. If the database cannot return an updatable result set, a read-only result set is returned instead. This is done automatically and usually without error. Some database systems may raise an exception on requests for live result sets that cannot be fulfilled. Check the success of the request by inspecting the dataset component's CanModify property.

If the SQL statement used in a TQuery is a general, multi-row SELECT statement, RequestLive can be used with either a true or a false value. For all other SQL statements issued from the TQuery, RequestLive should only be set to false. These other statements include noncursor single-row SELECT statements (more commonly found in stored procedure programming), noncursor Data Manipulation Language (DML) statements like UPDATE or DELETE, and Data Definition Language (DDL) statements like CREATE TABLE and DROP INDEX.

Note: All multi-table queries return read-only result sets. Other conditions may cause a query to return a read-only result set. For local tables (such as dBASE and Paradox), see the local SQL help file for rules governing live result sets (updatable queries). For other table types (such as InterBase, Oracle, and Sybase), consult the documentation for the specific database system.

Note: Some SQL database systems require strict case-sensitivity for names of metadata objects in SQL statements. These SQL databases typically have problems with the way metadata names are passed by the BDE in live queries and an exception is raised. A workaround that helps in most cases is to enclose the metadata object references (like table and column names) in quotation marks.

See Also