ASP操作数据库3在对应所需名称或序数的集合中,未找到项目
出现错误:ASP操作数据库3在对应所需名称或序数的集合中,未找到项目 在41行<!-- #include file="db.inc.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<head>
<meta http-equiv="Content-Type" c />
<title>注册结果</title>
<style type="text/css">
<!-
body {
margin-top: 0px;
margin-bottom: 0px;
background-image: url();
background-repeat: no-repeat;
}
-->
</style></head>
<body>
<table width="800" border="0" align="center" cellspacing="0">
<tr>
<td width="218" height="72"> </td>
<td width="376"> </td>
<td width="200"> </td>
</tr>
<tr>
<td> </td>
<td align="center" valign="middle">
<%
set rst=Server.CreateObject("ADODB.recordset")
rst.open "select * from user where u_user='" & request.form("f_user") & "'",conn,1,1
if rst.recordcount>0 then
response.write "用户名:" & request.form("f_user") & "已经被占用,请后退"
rst.close
set rst=nothing
conn.close
set conn=nothing
response.end
else
rst.close
rst.open "user",conn,1,3
rst.addnew '插入数据到user表
rst (u_user)=request.form("f_user")
rst (u_code)=request.form("f_code")
rst update
rst close
set rst1=conn.execute("SELECT @@IDENTITY AS UID")
uid=rst1("uid")
rst.open "info",conn,1,3
rst.addnew
rst ("i_uid")=uid
rst (i_name)=request.form("f_name")
rst (i_sex)=request.form("f_sex")
rst (i_age)=request.form("f_age")
rst update
rst close
end if
%>
<script language=vbscript>
msgbox "恭喜您注册成功",vbokcancel,"注册信息"
</script>
<img src="4.jpg" width="590" height="332"><br></td>
<td> </td>
</tr>
<tr>
<td height="154"> </td>
<td> </td>
<td> </td>
</tr>
</table>
<%
set rst=nothing
conn.close
set conn=nothing
%>
</body>
</html>