How To…Launch the DADE Query Designer in Code

Question

“How do I launch the Query Designer outside the designer as a stand-alone dialog?”

Solution

The query designer can be launched separate from the designer and used to generate SQL as a stand-alone dialog. Start by creating a TdaQueryDesignerForm object and assigning it a SQL object to use. Once the dialog has been used and closed, access the SQL object to obtain the generated SQL code.

Download: LaunchQueryDesignerViaCode.zipLaunchQueryDesignerViaCodeADO.zip

Delphi code sample: