Define parameters in QueryParams Tab of the SQL/Driver Data View property editor

Category

Rave - General

Question

How do I use the QueryParams Tab of the SQL Data View Property Editor?

Solution

Parameters in your SQL statement such as:

Select * From Table
 Where ID = :ID

would define a parameter called ID. In the parameters tab, you list each parameter on a separate line and give it a datatext value such as:

ID=Param.ID('123')

The above line would read the value of the project parameter named ID and if it was not defined (i.e., you are running from within the Rave IDE), it will use the default value of 123. The SQL parameter does not need to be the same name as the project parameter and you can use any valid datatext expression (same as TRaveDataText.DataField). Also, there's a minor glitch that you can't have any spaces around the equal sign in the parameter definition.