Download IBM Informix Web DataBlade Module Application Developer`s Guide
Transcript
Two-Pass Query Processing Two-Pass Query Processing Webdriver generates an SQL statement to retrieve an AppPage by building a call to the WebExplode() function, as described in IBM Informix Web DataBlade Module Administrator’s Guide. The SQL statement looks something like the following example: SELECT WebExplode (object, 'name=value&name2=value2') FROM wbPages WHERE ID='mypage' and path='/' and extension='html'; The preceding query successfully retrieves the requested AppPage in all but the following two cases: ■ The AppPage contains an MISQL tag that attempts to update the table in which the AppPage is stored. In the preceding example, this table is wbPages. In this case, the following error is returned: Exception from Informix: XIX000:-7435:This statement references a table that is used in the parent queries. ■ The AppPage contains an MISQL tag that issues a data-definition language (DDL) statement. And example of a DDL statement is the DROP TABLE statement. You cannot issue a DDL statement inside a user-defined routine (in this case, the WebExplode() function) because the user-defined routine is executed as part of a data-manipulation language (DML) statement. In this case, the following error is generated: Exception from Informix: XIX000:-7502:Illegal SQL statement in user-defined routine: 'drop table mytable;' The workaround for the preceding situations is to inform Webdriver, via the MIqry2pass Webdriver variable, that it must use a two-pass method to execute the query. This means the query is broken up into two parts, executed one after the other. Variable Mandatory? Description MIqry2pass No Specifies a query to be executed in two parts MIqry2pass selects an object and then executes a function. Used only in a URL. Default is set to OFF. Using Other Webdriver Features 13-15