You can add a query to a project by doing the following sequence of steps.
| Add a database component and QueryDataSet to your Data Access tree. | ![]() |
| Connect the database component to your database.Click on the ellipse (...) in the inspector for the database(top at right). You will see the connection dialog (bottom at right). Click on the choose URL button and from the chooser dialog (middle at right) select the database alias you created in ODBC . Finally press the test button n the connection dialog and you should see success appear below the button (after a brief wait). If you get failed, check your alias. | ![]() |
| Once your database is connected, you can create one or more queries. Click on the query you want to set in the tree pane. Next in the inspectory find the query entry. Click on the ellipse(...) and the query dialog appears. Select the database using the combo box at the top. Write the SQL query in the edit box for that purpose. If you want to select collumns from a table or the table itself and can't remember the names, use the Browse button to browse the table and/or collumns. You can paste your choices directly into your query using the appropriate paste button. | |
You now have a completed Query and you may use it for many purposes. It can be displayed in a table .