Skip to main content

Using SQL Query

The SQL query query type is created for communicating with database structures that support SQL.

  1. In the DataSource, **'New Item' must be selected, then for type, an appropriate SQL file type must be selected. (Our examples will walk through MSSQL Query.)

  1. The desired SQL statements are written in the editor on the opened file.

## NOTE
## Parameter Usage
- Parameter usage is defined as **{{PARAMETERNAME}}**.
  1. The bottom panel displays the parameters to be sent with it, the information of the columns returned as SQL result, and the results. -Parameters
    - The parameters added in the query will be displayed directly on the Parameters screen inside the bottom panel. Here the default value and parameter type for the parameter are configured.
    -Columns
    - It is the window used to display the names and types of the columns present in the values returned as a result of the query.
    ![](https://docsbimser.blob.core.windows.net/imagecontainer/1-88bce281-441d-4d3d-b3cd-bb844198373c.png)
    -Result
    - The window used to display the data returned by the query (only the first 100 rows).
    ![](https://docsbimser.blob.core.windows.net/imagecontainer/1-b65c5afd-d002-4e6e-9506-b0251daf67e9.png)
  2. Together with the Feature Viewer, the query to be written; Properties Explanation
    * Data source to be linked
    * Timeout period
    * Operating type
    * ExecuteDataAdapter is used to retrieve data from the data source.
    * ExecuteNonQuery is a type of query used to perform operations that do not return a data source.
    * ExecuteScalar is used for queries that are configured to return only one row of data from the data source.
    * Command type
    *Cache
    * Cache activity
    * Cache duration

such configurations are provided.