不能用两次rs.open吗?
我用了两次rs.open时,第二个列表就显示不出内容。代码如下:
Set rs=Server.CreateObject("ADODB.Recordset")
'设置rs的ActiveConnection属性,绑定到连接
Set rs.ActiveConnection = Conn
'设置游标类型
rs.CursorType = 3
<select name="select1">
<%
rs.open"Select ID,类型 from 成绩类型 "
do while not rs.eof
%>
<option value=<%=rs("ID")%>><%=rs("类型")%></option>
<%rs.movenext
loop
rs.movefirst
rs.close
set rs=nothing
%>
</select></td>
<td width="110"><div align="center">科 目</div></td>
<td width="110"><select name="select2"><%
rs.open"Select ID,科目 from 科目名称 "
do while not rs.eof
%>
<option value=<%=rs("ID")%> selected><%=rs("科目")%></option>
<%rs.movenext
loop
rs.movefirst
rs.close
set rs=nothing
%>
</select></td>