SQL Security
Last updated
Last updated
(c) 2024 Data Illusion Zumbrunn. All rights reserved. Reproduction strictly forbidden.
The SQL Security allows you to restrict access of the survey to a given row of an existing SQL Server table and let you reuse the data from that query for piping purposes anywhere in your survey questions or answers using the data attributes. Each query can be parametrized using entries from the respondent. You can add new variables to build a user interface allowing the respondent to fill them up. These variable can then be used in your query as standard SQL parameters.
If you want to fill a variable based on a querystring you can create a variable of type "Hidden" and pipe in its default a value from the querystring as shown below where a customer id is piped from the querystring "customerid" variable.
If your user interface is composed using only hidden variable ngSurvey will automatically call the query once the survey gets loaded and no user interface will be shown.
Respondent will only be granted access if the query returns a row or if the Access only to SQL entries option is disabled.
Once the respondent has finished the survey and submitted his answers ngSurvey will save the retrieved SQL data along the respondent answers.
Available Connections
Connection that will be used to connect to your database
SQL query
SQL query or stored procedure call that will return the row and its column.
Allow multiple submissions
lets the same row submit multiple times on the same survey.
Introduction message
will be shown above the fields user interface when respondents tries to access the survey.
Invalid key message
error message shown to the user if no row is returned based on the entered value.
This security item can be used as a key provider.