AutoFormat

[This is preliminary documentation and subject to change.]

The AutoFormat method converts the data stored in an ADO Recordset object into an HTML table.

Syntax

AutoFormat(TableData)

Parameters

TableData
An ADO Recordset object that contains the data to format.

This object is typically retrieved from a database on the server by using the Database Access component. For more information about this component, see the Component Reference in the Active Server Pages documentation.

Example

The following example uses the AutoFormat method to create an HTML table that displays the data in an ADO Recordset object. Note that the first three lines use the Database Access component to retrieve a record set from the ADOSamples database.

For more information about the Database Access component, see 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.AutoFormat(RS)  
%>
 

Applies To

HTML Table Formatter Component

See Also

Borders, HeadingRow