Creating a New HTML Template

WinSQL Professional exports data based on an SQL query. Therefore, you must select a query in the Query window before clicking the export icon. You cannot use parameterized queries to publish HTML.

Perform the following steps to execute the Web Publishing Wizard to generate a new HTML template:

1          From the Query menu, click Publish as HTML. The following window displays:

2          Click New, and then click Next. The following window displays:

 

Header and Footer Files

WinSQL Professional uses two files, header and footer, to enclose the exported data. This allows you to format the output to suit your needs.

The following describes rules for the header file:

·The header file must have the beginning HTML tags including <html>, <title> <body> and others.

·The resultant data gets displayed into a table. Therefore, the header file must end with a <table> tag.

The following describes rules for the footer file:

·Footer file must have the ending tags of an HTML page.

·It must begin with a </table> tag.

The following is an example of a header file:

<html>
<head>
<title>SQL query result</title>

</head>
<body bgcolor="#FFFFFF">

<!—You can add more data here -->

<div align="center"><center>

<table border="0" cellpadding="2">

The following is an example of a footer file:

</table></center></div></body></html>

Table header, rows and columns properties

3          After clicking Next, the following window displays:

This window allows you to specify the properties for the table header, table rows and table columns. The values in these fields must conform to HTML rules and must have a ::DATA parameter. ::DATA is replaced by the actual value when the export routine is run.

Example Table Header:

<th bgcolor="#000000"><font color="#FFFFFF"> ::DATA </font></th>

Example Table Row:

<tr BGCOLOR="#FFFFCC"> ::DATA </tr>

Example Table Column:

<td> ::DATA </td>

4          Once all the necessary information has been entered, click the Next until the summary screen displays. Click Finish to publish the results.