Customization File SQL Section

   

The sql section can contain:

The new SQL string may be parameterized. That is, parameters in the sql section SQL string (designated by the '?' character) can be replaced by corresponding arguments in an identifier in the client command string (designated by a parenthesized, comma-delimited list). The identifier and parenthesized argument list behave like a function call.

For example, assume the client command string is "CustomerByID(4)", the SQL section header is [SQL CustomerByID], and the new SQL section string is "SELECT * FROM Customers WHERE CustomerID = ?". The Handler will generate "SELECT * FROM Customers WHERE CustomerID = 4" and use that string to query the data source.

If the new SQL statement is the null string ("") then the section is ignored.

If the new SQL statement string is invalid, then the execution of the statement will fail. The client parameter is effectively ignored. You can do this on purpose to "turn off" all client SQL commands by specifying:

[SQL default] 
SQL = " "

Syntax

A replacement SQL string entry is of the form:

SQL=sqlString

Part Description
SQL Literal string—Indicates this is a SQL section entry.
sqlString A SQL string that replaces the client string.