You can use the @DesignMode parameter in your SQL script to detect if the script is executed by either VenturaSQL Studio or the VenturaSQL runtime.

The data type of @DesignMode is Bit (boolean).

The parameter is declared automatically by VenturaSQL.

@DesignMode has a value of 1 when the SQL statement is executed by VenturaSQL Studio.

@DesignMode has value 0 when executed by the VenturaSQL runtime.

A Transact-SQL example where the INSERT statement is only executed at runtime:

The parameter prefix '@' can be different for some ADO.NET Providers.