ASP中为什么会出现游标冲突啊!!!!!!!!!!!
<!--#include file="conn/conn.asp"-->
<% If Cstr(Trim(request("vali")))=Cstr(Session("cnbruce.com_ValidateCode")) Then
nick=request.Form("nick")
sql="select username from Tab_user where username='"&nick&"'"
set rs_chk=conn.execute(sql)
if rs_chk.eof then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from tab_user",conn,3,3
session("username")=request.Form("nick")
session("pwd")=request.Form("pwd")
dpwd=request.Form("dpwd")
email=request.Form("email")
truename=request.Form("truename")
design=request.Form("design")
qq=request.Form("qq")
postcode=request.Form("postcode")
address=request.Form("address")
tel=request.Form("tel")
rs.addnew
rs("username")=session("username")
rs("pwd")=session("pwd")
rs("email")=email
rs("truename")=truename
rs("sign")=design
rs("qq")=qq
rs("postcode")=postcode
rs("address")=address
rs("tel")=tel
rs.update 这里提示游标冲突啊!
response.Redirect"reg_suc.asp"
else%>
<script language="javascript">
alert("用户已存在,请重新输入用户名!")
history.back(1);
</script>
<% end if
else %>
<script language="javascript">
alert("验证码输入错误~请重新输入")
history.back()
</script>
<%end if%>
<%set rs=nothing
conn.close
set conn=nothing
%>
参考答案:有可能是rs_chk和rs冲突
set rs=server.CreateObject("adodb.recordset")
sql="select * from Tab_user where username='"&nick&"'"
rs.open sql,conn,1,3
if rs.eof then
rs.addnew
......
rs.update
else
response.write "用户存在"
end if
你把前面的那个判断去掉,直接用这个试试