Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
[Microsoft][ODBC Microsoft Access Driver] 由于其 Required 属性设置为真(True),字段 'userinfor.user_name' 不能包含 Null 值。在此字段中输入一个数值。
/www.cnzz1.cn/submit_dt.asp,行 37
原代码为:
<%@ language=VBScript %>
<%
set conn=server.CreateObject("adodb.connection")
connstr="dbq="&server.MapPath("diaocha.mdb")&";driver={microsoft access driver (*.mdb)};"
conn.open connstr
set rec=server.CreateObject("adodb.recordset")
sqlstr="select * from userinfor"
rec.open sqlstr,conn,2,3
rec.addnew
rec("user_name")=request.form("user_name")
rec("user_id")=request.form("user_id")
rec("user_tel")=request.form("user_tel")
rec("user_add")=request.form("user_add")
rec("answer1")=request.form("answer1")
rec("answer2")=request.form("answer2")
rec("answer3")=request.form("answer3")
rec("answer4")=request.form("answer4")
rec("answer5")=request.form("answer5")
rec("answer6")=request.form("answer6")
rec("answer7")=request.form("answer7")
rec("answer8")=request.form("answer8")
rec("answer9")=request.form("answer9")
rec("answer10")=request.form("answer10")
rec("answer11")=request.form("answer11")
rec("answer12")=request.form("answer12")
rec("answer13")=request.form("answer13")
rec("answer14")=request.form("answer14")
rec("answer15")=request.form("answer15")
rec("answer16")=request.form("answer16")
rec("user_job")=request.form("answer17")
rec("answer18")=request.form("answer18")
rec("answer19")=request.form("answer19")
rec("answer20")=request.form("answer20")
rec("answer21")=request.form("answer21")
rec("answer22")=request.form("answer22")
rec("user_sex")=request.form("answer23")
rec.update
rec.close
set rec=nothing
response.redirect "sucess.asp"
%>
请高手指教!