DatStat Illume 4.5 SDK Class Reference

HookContext.ExecSQLCommand Method 

Executes the given SQL command statement sqlStatement.

public void ExecSQLCommand(
   String sqlStatement
);

Parameters

sqlStatement
The SQL command statement to execute.

Remarks

At times there may be a need to perform commands on other schema that exist in the same SQL Server as DatStat Illume. Note that directly manipulating the DatStat Illume schema using SQL Commands is not encouraged nor supported by DatStat as this may negatively affect the DatStat Illume system.

This method provides the ability to perform SQL commands like DROP, INSERT etc., which do not return any results. The added benefit of this method is that it will use the existing DatStat Illume Collector connection pool alleviating the need for the developer to get a connection.

If there are errors during the execution of the provided SQL Statement, this call will throw an exception. It will be up to the hook developer to catch these exceptions and it is very important that this is done or the survey will stop running resulting in your survey participant getting presented with an error page with very limited information.

See Also

HookContext Class | DatStat.Collector Namespace | ExecSQLWithResults