HTML Table Formatter Component

[This is preliminary documentation and subject to change.]

The HTML Table Formatter component automatically converts data from an ADO Recordset object into an HTML-formatted table.

Note This component is not officially supported by Microsoft Corporation. Peer support is available on the Active Server Pages mailing list or on the microsoft.public.inetserver.iis.activeserverpages newsgroup.

To subscribe to the Active Server Pages mailing list, send mail to listserv@listserv.msn.com with

subscribe ActiveServerPages [firstname lastname]

in the body of the message, and then follow the directions carefully. (firstname and lastname are optional.)

You can reach the newsgroup through msnews.microsoft.com and other NNTP servers.

File Names

HTMLTable.class The HTML Table Formatter component.

Syntax

Set oVar = Server.CreateObject("IISSample.HTMLTable")

Registry Entries

None.

Properties

Borders Specifies whether the table cells have borders.
Caption Specifies a caption for the table.
CaptionStyle Specifies a style for the table's caption.
HeadingRow Specifies whether the first row contains column headers.

Methods

AutoFormat Converts specified ADO Recordset data into an HTML table.

Example

The following example uses the HTML Table Formatter component to format the data contained in an ADO Recordset object. Note that the first three lines use the Database Access component to extract a set of records from the ADOSamples database.

For more information about the Database Access component, see the Component Reference in the Active Server Pages documentation.
<%
  Set Conn = Server.CreateObject("ADODB.Connection")
  Conn.Open "ADOSamples"
  Set RS = Conn.Execute("SELECT * FROM Orders")

  Set myHTMLTable = Server.CreateObject("IISSample.HTMLTable")

  myHTMLTable.Borders = True         'True is the default
  myHTMLTable.HeadingRow = True      'True is the default
  myHTMLTable.AutoFormat(RS)  
%>