<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<TITLE>PO2 Computer list</title>
<body>
<H2 align = center >po2 computer list
<%
Dbpath=server.mappath ("computer.accdb")
' Response.Write DBPath
Set Connread=server.createobject ("Adodb.connection")
Connread.open "Provider=microsoft.ace.oledb.12.0;data source=" &dbpath
exec= "Select*from computerlist"
Set Rsread=server.createobject ("Adodb.recordset")
Rsread.open exec,connread,1,1
If Connread. Errors.Count > 0 Then
For i = 1 to Connread. Errors.Count
Set Err=connread. Errors.item (i-1)
Response.Write Err. Number & Err. Description
Next
End If
%>
<table width= "100%" bgcolor= "#fff5ee" >
<tr>
<%for each x in Rsread. Fields
Response.Write ("<th align= ' middle ' bgcolor= ' #b0c4de ' >" & x.name & "</th>")
Next
%>
</tr>
<%do until Rsread. Eof%>
<tr>
<%for each x in Rsread. Fields%>
<td align = ' middle ' ><%response.write (x.value)%></td>
<%next
Rsread. MoveNext
%>
</tr>
<%loop
Rsread.close
Connread.close
Set Connread =nothing
Set rsread = Nothing
%>
</table>
<em>version:1.1 </em>
</body>
This article is from "Eric's Mind Journey" blog, declined reprint!
Actual combat ASP Show Computer List