Download Informix Web DataBlade Module Application Developer`s Guide
Transcript
TAG Attribute TAG Attribute When an error occurs and the WebExplode() function invokes an MIERROR tag, the tag behaves like an MISQL, MIVAR, or dynamic tag, depending on the TAG attribute. Use the TAG=MISQL attribute assignment to execute the SQL statement specified in the SQL attribute. The following example shows how to use the TAG attribute. The SELECT statement specified in the SQL attribute is performed when the MIERROR tag is invoked. This error handler retrieves an error message from the my_weberr_catalog table. The error handler assumes that the table already exists. <?MIERROR TAG=MISQL SQL="select error_msg from my_weberr_catalog where error_id='$MI_ERRORCODE';">$1<?/MIERROR> This is equivalent to executing the following MISQL tag: <?MISQL SQL="select error_msg from my_weberr_catalog where error_id='$MI_ERRORCODE';">$1<?/MISQL> Important: When an error occurs during the processing of an AppPage, the entire transaction is rolled back. Therefore an INSERT, UPDATE, or any other update performed by the SQL statement in the MIERROR tag is also rolled back. An MIERROR tag with the TAG=MIVAR attribute assignment behaves like an MIVAR tag with no NAME attribute. Use the TAG=MIVAR attribute assignment to output an error message. For example, when the following MIERROR tag is invoked, the text between the start and end tags is output: <?MIERROR TAG=MIVAR> <B>Please contact your Web Administrator.</B><BR><?/MIERROR> This is equivalent to executing the following MIVAR tag: <?MIVAR><B>Please contact your Web Administrator.</B><BR><?/MIVAR> Using Tags in AppPages 6-31