|
网站的网址是www.xitaotao.com.cn
会员注册的网址是:http://www.xitaotao.com.cn/mreg1.asp
按照规则注册之后,一提交出现如下代码:
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]无法将 NULL 值插入列 'id',表 'xitaotaocomcn.xitaotaocomcn.info_mem';该列不允许空值。INSERT 失败。
/mreg2.asp,行 134
行134是下面程序段的红色部分。
<%
uname=request.form("uname")
upass=request.form("upass")
uemail=request.form("uemail")
rname=request.form("rname")
if uname<>"" and rname<>"" then
' response.write uname&"uname"
'response.write rname&"rname"
scard=request.form("scard")
sex=request.form("sex")
mtel=request.form("mtel")
address=request.form("address")
ips=request.servervariables("remote_addr")
sql="select * from info_mem where uname='"&uname&"' and email='"&email&"'"
rs.open sql,conn,1,3
if not rs.eof then
response.write "<script language=javascript> alert('已经存在,请重新输入~');window.history.go(-1);</script>"
response.end
else
rs.addnew
rs("uname")=uname
rs("upass")=upass
rs("email")=uemail
rs("rname")=rname
rs("scard")=scard
rs("sex")=sex
rs("combile")=mtel
rs("address")=address
rs("qq")=mqq
rs("ips")=ips
rs.update 行134
response.write "<script language=javascript> alert('注册成功!');"
response.write "window.location.href='./mem/minfo.asp';</script>"
end if
rs.close
sqlm="select * from info_mem where uname='"&uname&"'"
rs.open sqlm,conn,1,1
session("username")=rname
session("userid")=rs("id")
rs.close
set rs=nothing
%>
不明白是怎么回事
连接用的conn文件如下:
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionTimeout = 10
conn.CommandTimeout = 20
conn.CursorLocation = 3
conn.ConnectionString = "driver={SQL Server};server=(local);uid=yigou;pwd=yigou;database=dazhe2"
conn.Open
Set rs = Server.CreateObject("ADODB.Recordset")
%>
各位帮忙看看啊。。谢谢!~ |
|