From RAD Studio API Documentation
Jump to: navigation, search


property GetMetadata: Boolean read FGetMetadata write FGetMetadata default 0;


__property GetMetadata = {default=0};


Type Visibility Source Unit Parent
property published
SimpleDS TInternalSQLDataSet


Specifies whether the SQL dataset fetches metadata information along with the data.

SimpleDS.TInternalSQLDataSet.GetMetadata inherits from Data.SqlExpr.TCustomSQLDataSet.GetMetadata. All content below this line refers to Data.SqlExpr.TCustomSQLDataSet.GetMetadata.

Specifies whether the SQL dataset fetches metadata information along with the data.

Use GetMetadata to turn on or off the fetching of metadata on a database object. Setting GetMetadata to False will improve performance because no additional SQL will execute in order to get index information. However, setting GetMetadata to False might slow any attempts to update data using a client dataset that is linked via a dataset provider because the resolver might not generate optimized SQL to perform the update.

GetMetadata must be True to perform any operations that require an index. These operations include setting up master/detail relationships, updating data from a client dataset when the provider's UpdateMode is not upWhereAll, and delayed fetching of BLOB data. It must also be True for SQL queries containing Aggregate functions or GROUP BY clauses, or both of them simultaneously.

Set GetMetadata to False if you are fetching a dataset for read-only purposes.

Note: In the iOS IBLite code snippet, GetMetadata for TSqlQuery is set to False in order to reduce the number of transactions that are started upon opening the dataset.

See Also