Home → Active Query Builder - Metadata handling and filtration → Metadata handling and filtration in Java, VCL and ActiveX Editions → Asyncronous metadata loading in VCL and ActiveX editions
2.6. Asyncronous metadata loading in VCL and ActiveX editions
Metadata loading process may take a long time in case of large database schema. Since version 1.23 metadata can be loaded asyncronously 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 true 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 asyncronously by default. To turn it back to syncronous mode, set the ActiveQueryBuilderX.AsyncMetadataLoading property to false.
The following methods work in syncronous mode: RefreshMetadata, LoadMetadata. The newly added RefreshMetadataAsync and LoadMetadataAsync methods work in asyncronous mode. The new CancelAsyncMetadataLoading method lets cancel asyncronous metadata loading. The new OnMetadataLoaded event allows for taking additional action after completion of the metadata loading process.
It is possible to take advantage of this functionality for your individual needs to make copies of database connections and to execute SQL queries in another threads, regardless of the data access components being used. You can read about this in a separate article: