ColumnDelimiter(分隔记录集的列的HTML代码),RowDelimiter(分隔记录集的行的HTML 代码),和NullExpr(当前记录为空时应生成的HTML代码). 就象你在下面生成HTML表格的 例子里所看到的那样,每列用<TD >...</TD >分隔,每行用<TR >...</TR >分隔. 来 看看例子的代码吧.
以下为引用的内容:
<%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit 'Good coding technique 'Establish connection to DB Dim conn Set conn = Server.CreateObject("ADODB.Connection") conn.Open "DSN=Northwind;" 'Create a recordset Dim rs Set rs = Server.CreateObject("ADODB.Recordset") rs.Open "SELECT * FROM table1", conn 'Store our one big string Dim strTable strTable = rs.GetString(,,"</td ><td >","</td ></tr ><tr ><td >" ," ") %> <HTML> <BODY> <TABLE> <TR ><TD> <% Response.Write(strTable) %> </TR ></TD> </TABLE> </BODY> </HTML> <% 'Cleanup! rs.Close Set rs = Nothing conn.Close Set conn = Nothing %>
|
strTable字符串用于存放我们从"SELECT * FROM table1"结果生成的HTML表格的代码.
HTML表格的每列之间都将有&