ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/seagull/teacherpj/regdisplay.asp
我也遇到了同样的问题啊
请高手指教!
下面是regdisplay.asp程序
<!--#include file="top.asp"-->
<!--#include file="Function.asp"-->
<!--#include file="Odbc_connection.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="wangye9pt.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="786" height="500" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="188" rowspan="2" valign="top" background="images/lefttiao.jpg"><!--#include file="left.asp"--></td>
<td height="20" colspan="2"><img src="images/righttop.jpg" width="598" height="20"></td>
</tr>
<tr>
<td width="589" height="500" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> </tr>
</table>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#336699" class="w9pt">
<tr align="center" bgcolor="#336699">
<td height="25" colspan="2" class="W12pt"> <span class="9ptred">注册成功!
<%
username=session("userREGID")
strsql="select * From userinfo Where username='"&username&"'"
set rs=db.execute(strsql)
%>
</span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">系统分配的登陆ID:</td>
<td class="9ptred"><%=rs("username")%>(请记住使用此ID号码登陆)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="30%" height="25" align="right">注册身份:</td>
<td width="70%"><%
typedok=rs("typed")
if typedok=1 then
response.Write "领导"
elseif typedok=2 then
response.Write "同行"
else
response.Write "学生"
end if
%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">真实姓名:</td>
<td><%=rs("REALNAME")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">登陆密码:</td>
<td><%=rs("PASSWORD")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">学号/教师编号:</td>
<td><%=rs("num")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">E-Mail:</td>
<td><%=rs("email")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">联系电话:</td>
<td><%=rs("tel")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">联系地址:</td>
<td><%=rs("address")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">所在院系:</td>
<td><%=rs("DEPART")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">所在班级:</td>
<td><%=rs("CLASS1")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">注册时间:</td>
<td class="9ptred"><%=rs("submitdate")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" align="right">注册IP:</td>
<td><%=rs("IP")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="40" colspan="2" align="center"><A href="javascript:window.close();" class="w9pt">【关闭窗口】</A></td>
</tr>
</table></td>
<td width="9" background="images/rightright.jpg"></td>
</tr>
</table>
</body>
</html>
<!--#include file="foot.asp"-->
还有一个Regsubmit.asp程序
<!--#include file="Odbc_connection.asp"-->
<!--#include file="Function.asp"-->
<%
On Error Resume Next
insertok=trim(request.Form("insertok"))
username=trim(request.Form("username"))
password=trim(request.Form("password"))
password2=trim(request.Form("password2"))
reg=trim(request.Form("reg"))
reg1=trim(request.Form("reg1"))
typed=cint(trim(request.Form("typed")))
address=trim(request.Form("ADDRESS"))
department=request.Form("addone_id")
class1=request.Form("addtwo_id")
number=trim(request.Form("number"))
number1=number
Email=trim(request.Form("Email"))
tel=trim(request.Form("TEL"))
ip=request.ServerVariables("REMOTE_ADDR")
'-------------------------------------------
IF DEPARTMENT="请选择教师院系" or class1="请选择班级" THEN
response.write"<script>alert('请选择所在院系和班级!');location='REGOK.asp'</script>"
response.End()
END IF
if class1<>"—学校督导—" then
if class1<>"—教师同行—" then
strsql="select * from class where id="&class1
set rs=db.execute(strsql)
class1=rs("classname")
end if
end if
strsql="select * from department where id="&department
set rs=db.execute(strsql)
department=rs("department")
'----------------------------------------------
'--------------------将系别数字转换成文字
typedok=TONGGUO
if Email="" then
Email="无"
end if
if address="" then
address="无"
end if
if tel="" then
tel="无"
end if
'----------------------------------------------
user=number
'-----------------------------------------------产生用户ID
if username="" or password="" or number1="" then
response.write"<script>alert('请把信息添完整');location='regok.asp'</script>"
response.End()
end if
'------------------------------------------
if reg<>reg1 then
response.write"<script>alert('附加码错误!');location='regok.asp'</script>"
response.End()
end if
'----------------------------------------------------------------------
if db.errors.count>0 then
response.write"<script>alert('数据提交时出现错误,请重新申请!');location='regok.asp'</script>"
end if
'------------------------------------------------------------
strsql="INSERT INTO userinfo(USERNAME,PASSWORD,REALNAME,TYPED,TYPEDOK,EMAIL,NUM,TEL,ADDRESS,SUBMITDATE,IP,DEPART,CLASS1)"
strsql=strsql&"values('"&USER&"','"&PASSWORD&"','"&USERNAME&"',"&TYPED&","&TYPEDOK&",'"&EMAIL&"','"&NUMBER&"','"&TEL&"','"&ADDRESS&"','"&now()&"','"&IP&"','"&DEPARTMENT&"','"&CLASS1&"')"
db.execute(strsql)
session("userREGID")=USER
response.write"<script>alert('注册成功!');location='regdisplay.asp'</script>"
%>