HomeActive Query Builder - IntroductionQuick Start GuidesQuick Start Guide for VCL edition (Delphi)

1.7. Quick Start Guide for VCL edition (Delphi)

  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 the TacSQLBuilderPlainText component on the form to get SQL code generated by the Query Builder with formatting. Link it to the TacQueryBuilder component by setting it's QueryBuilder property.

  5. Add the TMemo or any other text editing component (for example, TSynEdit) to a form.

  6. Now you should establish connection between the TacSQLBuilderPlainText 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:
    // syncronous loading; may take a long time in case of large database schema


    // asyncronous loading; allows to work with the component almost instantly. 
    // database schema tree will be filled after completion of the metadata loading process.


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

    Don't forget to activate your database connection component.

This page was: Helpful | Not Helpful