DB Query lister (IDC simulator)
This sample uses template page and user specified SQL query to create an ASP page that will display the query results.

The template syntax resembles the Microsoft IDC syntax but result is a regular ASP page. The template page may contain or not contain other ASP code.

The script uses ASP like tags in the template file. Initially they will not contain any script code but after processing they will be replaced with appropriate ASP code.

Template syntax:

<%BeginDetail%> - Marks the beginning of the part of the template page - that will be repeated for each record returned by the query.

<%EndDetail%> - Marks the end of the part of the template page - that will be repeated for each record returned by the query.

<%Field_Name%> - Any number of these tags may appear between <%BeginDetail%> and <%EndDetail%> tags. The Field_Name in each of them must be set to the name of an existent field in the results returned by the query. The script will check for its existence and will issue warning if the field is not returned by the query.

To use the script attach it to an ASP template file in your project and configure it using the CTS configuration dialog. You must specify the query and the virtual/relative path to the MDB file (Page size is not implemented yet - it is not a part of IDC syntax but we have an idea ;) ).

This could be used with the following processing options ASPtoASPPlain, ASPToASP and ASPtoVB. The ASPtoVB option will cause processing to continue with creation of a DLL from the resulting ASP!

Other processing options are not applicable because this script generates ASP code.