[This is preliminary documentation and subject to change.]
The AutoFormat method converts the data stored in an ADO Recordset object into an HTML table.
AutoFormat(TableData)
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.
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.
<% 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) %>
HTML Table Formatter Component