Quick Start Guide

.NET Edition workflow

  1. Place the QueryBuilder component on the form.

  2. Place required metadata and syntax provider components on the form. Define a proper database connection object for the metadata provider.

  3. Link the components above to the QueryBuilder by setting MetadataProvider and SyntaxProvider properties

  4. Place some of the *SQLBuilder components on the form to get SQL code generated by the QueryBuilder component in required format. Link it to the TacQueryBuilder component by setting its QueryBuilder property.

  5. Add the TextBox or any other text editing component to a form. In case of using a plain text editor you should use the PlainTextSQLBuilder component at the previous step.

  6. Now you should establish connection between SQLBuilder and the TextBox components.
    Enter the following code to Leave event of TextBox component:

    if (textBox1.Modified)
    {
       try
          {
             queryBuilder1.SQL = textBox1.Text;
          }
      catch (Exception ex)
          {
             MessageBox.Show(ex.Message, "Parsing error");
          }
    
       textBox1.Modified = false;
    }

    Enter the following code to SQLUpdated event of SQLBuilder component:

    textBox1.Text = plainTextSQLBuilder1.SQL;
    

  7. Execute the following code to load metadata and activate Active Query Builder:
    queryBuilder1.RefreshMetadata;
    

  8. That's all! Now you can run your application.




ActiveX Edition workflow

  1. Place the ActiveQueryBuilderX control on the form.

  2. Add the TextBox or any other text editor control to a form. In case of using the TextBox control you should set its MultiLine property to True.

  3. Now you should establish connection between the ActiveQueryBuilderX and the TextBox controls.
    Enter the following code to Leave event of TextBox control:

    ActiveQueryBuilderX1.SQL = TextBox1.Text
    

    Enter the following code to OnSQLChanged event of ActiveQueryBuilderX control:

    TextBox.Text := ActiveQueryBuilderX1.FormattedSQL
    

  4. That's all! Now you can run your application.

    And don't forget to fill the ConnectionString property of ActiveQueryBuilderX control with the right ADO connection string and to turn the Connected property to True!




VCL Edition workflow

  1. Place the TacQueryBuilder component on the form.

  2. Place required metadata and syntax provider components on the form. Define database connection for the metadata provider.

  3. Link the components above to the TacQueryBuilder by setting MetadataProvider and SyntaxProvider properties

  4. Place some of the TacSQLBuilder components on the form to get SQL code generated by the TacQueryBuilder component in required format. Link them to the TacQueryBuilder component by setting its QueryBuilder property.

  5. Add the TMemo or any other text editing component (for example, TSynEdit) to a form. In case of using a plain text editor you should use the TacSQLBuilderPlainText component at the previous step.

  6. Now you should establish connection between the TacSQLBuilder and the TMemo components.
    Enter the following code to OnExit event of TMemo component:

    acQueryBuilder1.SQL := Memo1.Text;
    

    Enter the following code to OnSQLUpdated event of TacSQLBuilder component:

    Memo1.Text := acSQLBuilderPlainText1.SQL;
    

  7. Execute the following code to load metadata and activate Active Query Builder:
    acQueryBuilder1.RefreshMetadata;
    

  8. That's all! Now you can run your application.

    And don't forget to activate your database connection component!

News

Testimonial

With users expecting better and better interfaces to deal with complex data retrieval, Active Query Builder has allowed me to provide a highly professional, robust environment to both novice users and skilled query writers.

Thanks to all the team involved. Please keep up the good work.
CodeGear - Where Developers Matter