Active Query Builder for .NET 3 - Migration Guide
Last modified:
Installation of the Active Query Builder 3 .NET Edition does not affect the installation of the previous major version to be installed simultaneously.
Active Query Builder 3 Professional Edition lets design your visual query building UI in two ways. The first way is to use the all-in-one QueryBuilder control with all the necessary means to build SQL queries visually. This way is identical to what we had in the previous version, and hopefully, it is suitable for most users. Those users who want to customize the visual query building interface deeper should look at the separated controls mode, described in another article. This article describes the main code changes you need to take care of while migrating from AQB 2.x to AQB 3 in standard mode.
Assemblies
The "ActiveDatabaseSoftware." assembly prefix has been removed. All Active Query Builder assembly names now start with the "ActiveQueryBuilder." prefix.
The ActiveDatabaseSoftware.ActiveQueryBuilder2.dll assembly doesn't exist anymore. It has been split into three parts: ActiveQueryBuilder.Core.dll (non-visual SQL query engine), ActiveQueryBuilder.View.dll (UI controllers), and separate libraries for each platform and UI control library: ActiveQueryBuilder.View.Winforms.dll, ActiveQueryBuilder.View.Wpf.dll.
New Non-visual components
You should use new non-visual components if you don't need to visually build SQL queries but only need to parse, analyze, and modify SQL queries. They also must be created to work in the Separated controls UI mode.
The new SqlContext component implements the SQL parsing, and SQL text generation logic holds the link to Syntax Provider object that determines SQL syntax rules for specific SQL dialects. It also contains the MetadataContainer and MetadataStructure objects to store information about database schema and holds the link to the Metadata Provider object that establishes a connection to the database.
The SqlContext object could be shared among multiple SqlQuery objects, which may be connected to different instances of visual query building UI controls in their turn. This way, the programmer can quickly implement a multi-document interface to build several SQL queries in separate windows.
The new SqlQuery component implements SQL query building logic and contains the internal object representation of a query.
The QueryBuilder.Query property to get access to the query object model doesn't exist anymore. It has been moved to the SqlQuery.QueryRoot property.
PlainTextSQLBuilder
The PlainTextSQLBuilder component has been deleted. Its functionality has been embedded in the QueryBuilder component. The new QueryBuilder.SQLFormattingOptions group of properties has been added to set up the rules of result SQL query text formatting. The new QueryBuilder FormattedSQL property returns formatted SQL query text.
If you need more than one set of SQL generation and formatting properties (in the case of using Alternate Names or Virtual Objects), you can create a separate instance of the SqlFormattingOptions or SqlGenerationOptions object and get SQL text as described in this article.
QueryBuilder
- The OfflineMode property has been moved to the QueryBuilder.MetadataLoadingOptions group.
- The QueryStructureTreeOptions property has been deleted as the Query Structure Tree is replaced with the query and sub-query navigation bars.
- The AddObjectFormOptions property has been renamed to AddObjectDialogOptions.
- The DatabaseSchemaTreeOptions has been renamed to DatabaseSchemaViewOptions.
- The SQLGenerationOptions.QuoteIdentifiers boolean property has replaced the SQLGenerationOptions.QuoteAllIdentifiers property. The new property accepts three values: None, All, and IfNeeded (default).
QueryBuilder.PanesConfigurationOptions
- The LeftTreePaneVisible, RightTreePaneVisible, and SwapTrees properties have been deleted.
- The UnionNavBarVisible property has been deleted. The functionality of the Union Navigation Bar is moved to the Query Navigation Bar.
- The QueryNavigationBarVisible has replaced the SubQueryTabsVisible property.
QueryBuilder.BehaviorOptions
- The UseAltNames property that controls alternate names' usage in the component's UI now resides in the QueryBuilder.SQLGenerationOptions property group.
- The UnionNavBarVisible property has been deleted. The functionality of the Union Navigation Bar is moved to the Query Navigation Bar.
- The QueryNavigationBarVisible has replaced the SubQueryTabsVisible property.
QueryTransformer
The QueryProvider property has replaced the QueryBuilder and SqlBuilder properties. You can assign an instance of the QueryBuilder or SqlQuery object to this property.
SqlTextEditor
The QueryProvider property has replaced the QueryBuilder and SyntaxProvider properties. You can assign an instance of the QueryBuilder or SqlQuery object to this property.
mceclip0.png
mceclip1.png