Generating Parameterized Executables

For users who do not have access to WinSQL but who wish to run database queries using specific parameters, “parameterized” executables files can be created by a WinSQL user and delivered in the form of an executable file. These executables are dynamic, meaning the data is refreshed, and the results displayed are current each time they are run.

Perform the following steps to create a parameterized executable:

1          Use the information in the “Parameter Queries” topic provided in this help file to create your parameter query. The following is an example of a query using ::EnterRegion as a parameter that will  prompt the user to supply a value when the query is run:

SELECT * FROM Customers
WHERE region = ::EnterRegion

2          Execute the query.

3          With the query results displayed, right-click within the Resultset window, and then click Save to executable. A window similar to the following displays:

 

4          Click the Dynamic Executable icon, and then click Next. A window displays providing information about the perquisites and the connection string required to run the executable. If you are unsure what to specify for the connection string, click Help me create a connection string.

5          Click Next. A window similar to the following displays:

6          Type the desired name for this executable in the Executable Title field.

7          If necessary, click Browse by the Output File Name field to navigate to and select the location where you wish to save your query.

8          Click Finish. The executable is now available for delivery