asp高手请进,新手请教!!!
Microsoft OLE DB Provider for ODBC Drivers '***********'
[Microsoft][ODBC Microsoft Access Driver] 字段 'user.pass' 不能是零长度的字符串。
\wwwroot\wx\zccl.asp, line 16 ------这是什么意思??
这是源程序:<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("wx.mdb")
name=request.form("name")
pass=request.form("pass")
username=request.form("username")
exec="insert into user(name,pass,username)values('"+name+"','"+pass+"','"+username+"')"
conn.execute exec
conn.close
set conn=nothing
response.write "记录添加成功!"
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
哪位高手给解释一下??
参考答案:name=request.form("name")
pass=request.form("pass")
username=request.form("username")
if name="" then
response.write("<script>alert('姓名不能为空');history.back();</script>")
response.end
end if
if pass="" then
response.write("<script>alert('密码不能为空');history.back();</script>")
response.end
end if
if username="" then
response.write("<script>alert('用户名不能为空');history.back();</script>")
response.end
end if
exec="insert into [user] ([name],pass,username)values('"+name+"','"+pass+"','"+username+"')"