A Data source variable is used to describe a temporary data source (query, view, alias, ... ). All the operations that can be performed on a view (or on a query) can be performed on a Data source variable associated with a view (or with a query).

To describe a data source, you must:

Declare a "Data source" variable.

Initialize the data source (HExecuteSQLQuery or HCreateView).The data source is automatically freed at the end of the process where this data source is declared. Note: The data source can also be initialized by HDeclareExternal. In this case, the data source allows you to handle a data file by using the description of this file, independently of the analysis.

Notes:

When closing the application (or the process where the data source was declared), the data source will automatically be destroyed.

A global data source is always global to the HFSQL context where it was declared.

A data source may have an internal name other than the variable name, for example, to allow it to be used in an array. See "Naming of data sources" in the project description ("Compilation" tab).

Note: From version 19, HFSQL is the new name of HyperFileSQL.

Versions 17 and later

This type of variable is now available for iPhone/iPad applications.

New in version 17

This type of variable is now available for iPhone/iPad applications.

This type of variable is now available for iPhone/iPad applications.

Versions 18 and later

This type of variable is now available in Windows Store apps mode.

New in version 18

This type of variable is now available in Windows Store apps mode.

This type of variable is now available in Windows Store apps mode.

Versions 21 and later

This type of variable is now available in Universal Windows 10 App mode.

New in version 21

This type of variable is now available in Universal Windows 10 App mode.

This type of variable is now available in Universal Windows 10 App mode.

// Delete a data sourceMyQuery is DataSourceHExecuteSQLQuery(MyQuery, "SELECT NAME FROM CUSTOMER")// Destroy the data source associated with the MyQuery variableHCancelDeclaration(MyQuery)HExecuteSQLQuery(MyQuery, "SELECT NAME FROM SUPPLIER")

To handle a query or a view by programming, we recommend that you use a "Data Source" variable.

However, you have the ability to give a logical name when initializing the query or the view. It will then be necessary to use the keyword Extern to directly manage the view or query in the code editor. This method can slow down the execution of your processes.

Allows you to find out the replication mode used for a data file (file defined in the data model editor or by programming). For the files defined by programming, you can specify whether this file is in logged replication mode or not.