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")
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
%>