How to load data table with SQL code

This tutorial shows you how to use SQL code as Data source type in data table component. In our example we have page for products, and on first form of that page we will show data table of all products.

Datatable sql example

1. Login into developer panel.

2. Navigate to Pages menu item.

3. Select page pageProduct.

4. Drag and drop Datatable component from all components list to formDatatableProduct. 

Datatable sql with steps

5. In component properties section, select SQL code as Data source type. Click on textarea under Data source SQL label and enter SQL code. Columns of this SQL query result will be columns of generated data table. Click on Save button.

SQL code

6. Click on Save changes, go into your application and check out the results.