📄 445_1.asp
字号:
<html>
<head>
<TITLE>RecordSet的应用</TITLE>
</head>
<body bgcolor="#FFFFFF">
<%
set rstemp=Server.CreateObject("adodb.Recordset")
rstemp.maxrecords=3 '注意这里用了maxrecords属性
connectme="DSN=pubs;user id=sa;pwd=123"
rstemp.open "select * from titles", connectme,adopenstatic
' 显示表
howmanyfields=rstemp.fields.count -1
%>
<table border=1><tr>
<%
for i=0 to howmanyfields
%>
<td><b>
<%=rstemp(i).name %>
</b> </td>
<% next %>
</tr>
<%
do while not rstemp.eof
%>
<tr>
<%
for i = 0 to howmanyfields
%>
<td valign=top>
<% = rstemp.fields(i).value %>
</td>
<% next %>
</tr>
<%
rstemp.movenext
loop
%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -