追光者英文版歌词:郁闷了 asp高手帮帮忙吧

来源:百度文库 编辑:高考问答 时间:2024/04/28 08:53:20
源代码如下
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<%
sqladmin="select admin_zuanye,admin_zhanghao from admin where admin_zuanye<>'all'"
opentypeadmin="1"
%>
<!-- #include file="../asp/asp_linkadmin.asp"-->
<form name="changeuserform" method="post" action="admin_change.asp">
<label>学生帐号
<select name="userzhanghao" style="width:150px">
<%
if rsadmin.recordcount>0 then
while not rsadmin.eof
%>
<option value=<%=rsadmin("admin_zhanghao")%> selected="selected"><%=rsadmin("admin_zhanghao")%></option>
<%
rsadmin.movenext
wend
%>
</select>
<input name="stuzuanye" type="hidden" value=<%=rsadmin("admin_zuanye")%> />
<%
end if
%>
</label>
<label>
<input type="submit" name="Submit12" value="提交">
</label>
</form>
<!-- #include file="../asp/asp_admin_setnothing.asp"-->
<body>
</body>
</html>
asp_linkadmin的源码

<%'连接数据库admin
set connadmin=Server.CreateObject("Adodb.Connection")
set rsadmin= Server.CreateObject("Adodb.Recordset")
connadmin.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("../guanli_db/guanli.mdb")
rsadmin.open sqladmin,connadmin,1,opentypeadmin
%>

经过反复的测试 居然是rsadmin.movenext出了问题 我已经找了很长时间了 就是找不到原因 愿高手出来解答真能解决了加分50 决不食言
原因找到了
选环结束以后的隐藏域,值是不存在的
想了一天才想明白 苯呐

可惜我水平不够,帮不上忙:( 唉~我还得继续努力

你用vb还是用sql?

<input name="stuzuanye" type="hidden" value=<%=rsadmin("admin_zuanye")%> />