Template datasets
What is a ‘template dataset’?
A template datasets is a view containing selected columns of one more tables of a database. The database can be easySite database itself, or another SQL database stored on the same server or on another accessible remote SQL server.

Template dataset columns may be obtained by:
  • A view or query from current database (i.e. easySite’s database);
  • One SQL command that produces columns from current database;
  • One SQL command that explores an external database (hosted either on the same SQL server or another remote SQL Server).

Template datasets allow you to build:
  • Web forms that display data in list mode;
  • Data entry web forms;
  • Statistical reports with grouping and aggregations (sum / average…).

How to create a template dataset?
Creating a template dataset depends on the data source that it will explore:
  • If the data source is a table or a view hosted within the current database, the easiest way is to use the ‘generate template dataset wizard’ (will be available soon in this demo version) to select the desired query (view) and directly integrate its columns in a template dataset;
  • If the desired columns cannot be produced by an existing view or query in the current database, you can enter the SQL command that produces the desired columns in the ‘SQL command’ field of the template dataset form;
  • If the data to be explored is hosted on another database or on another SQL server, you should enter the required connection information and the SQL command that produces your desired data columns;
  • Note: if you intend to use the template dataset in data update operations, you should provide the name of the data table on which such operations should take place.

Useful information
  • The column ‘Exists’ is checked if the column of your template dataset effectively exists in the source query or view;
  • The column ‘Empty’ is checked if the column is a reservation that will not be taken into account in any of data updates;