Often, as you develop a complex Web application, you may find that keeping track of the vast quantities of data on multiple domains in databases that change daily quickly becomes a daunting task. To provide a quick, easy way to view a table's contents during development, try this script on for size:
Code:
<%@ LANGUAGE="VBSCRIPT" %>
<%
Dim objConn, objRec, strTable, strCmd
strTable = Request("tbl")
strCmd = "SELECT * FROM " & strTable
Set objConn=Server.CreateObject("ADODB.Connection")
Set objCmd = Server.CreateObject("ADODB.Command")
set objRec = Server.CreateObject("ADODB.Recordset")
objConn.Open "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" & _
Server.MapPath("Biblio.mdb")
objRec.open strCmd, objConn, , 1, 1
sTable="<TABLE BORDER='1'><THREAD><TR>"
'Collect the Field Names
For Each objFld in objRec.Fields
sTable = sTable & "<TD>" & objFld.Name & "</TD>"
Next
'Build the table body
sTable = sTable & "</TR></THREAD>" &
"<TBODY><TR><TD>" _
& objRec.getString(, ,"</TD><TD>",
"</TD></TR><TR><TD>") _
& "</TD></TR></TBODY></TABLE>"
Response.write sTable
objRec.Close
Set objRec = Nothing
objConn.Close
Set objConn = Nothing
%>