<!DOCTYPE html>
<html>
<body>
<%
定义 conn = Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("/db/northwind.mdb"))
定义 rs = Server.CreateObject("ADODB.recordset")
sql="SELECT Companyname, Contactname FROM Customers WHERE Country='Spain'"
rs.Open sql, conn
%>
<table border="1" width="100%">
<tr>
<% 对于 rs.Fields 中的每个 x
response.write("<th>" & x.name & "</th>")
下一%>
</tr>
<% 直到 rs.EOF 为止 >
<tr>
<% 对于 rs.Fields 中的每个 x >
<td><%Response.Write(x.value)%> </td>
<%下一
rs.MoveNext>
</tr>
<% 循环
rs.close
conn.close
%>
</table>
</body>
</html>