Active Query Builder support area

Asyncronous metadata loading in VCL and ActiveX editions

Last modified:


Metadata loading process may take a long time in case of a large database schema. Since the version 1.23, metadata can be loaded asynchronously to let the end-user start working with the component instantly.
During the metadata loading process the end user can load previously saved queries and modify them visually, but the Database Schema Tree will be empty. The field lists will be filled correctly, but field data types will be determined by querying the appropriate tables, not by retrieving this information from system tables. Thus they will be shown in a different way. For example, during the metadata loading process, a field of VARCHAR(30) type will be shown as "WideString" or "String", but after completion of this process, data type will be updated automatically and will be displayed as "VARCHAR(30)". Of course, this behavior will be correct for those servers that allow for retrieval of information about data types (for example, such information is unavailable for MS Access and some other desktop databases).
In the ActiveX version, metadata is loaded asynchronously by default. To turn it back to synchronous mode, set the ActiveQueryBuilderX.AsyncMetadataLoading property to false.
The following methods work in synchronous mode: RefreshMetadata, LoadMetadata. The newly added RefreshMetadataAsync and LoadMetadataAsync methods work in asynchronous mode. The new CancelAsyncMetadataLoading method lets cancel asynchronous metadata loading. The new OnMetadataLoaded event allows for taking additional action after completion of the metadata loading process.
Using the VCL Edition, it is possible to make use of this functionality for your individual needs to make copies of database connections and to execute SQL queries in other threads, regardless of the data access components being used. You can read about this in a separate article:

This article was helpful for 1 person. Is this article helpful for you?