ADO在 HTML 表格中显示记录
<html>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("/db/northwind.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT Companyname, Contactname FROM Customers", conn
%>
<table border="1" width="100%">
<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields%>
<td><%Response.Write(x.value)%></td>
<%next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>
</table>
</body>
</html>
Nokia Corporation | Olli-Pekka Kallasvuo |
Google, Inc. | Larry Page |
Sony Corporation of America | Kazuo Hirai |
Apple Computer, Inc. | Steven Jobs |
BAIDU, Inc | Li YanHong |
Canon USA, Inc. | Tsuneji Uchida |
发表评论 取消回复