大家帮忙啊,这段代码错在哪里呢
<% name=request.form("name")
sex=request.form("sex")
age=request.form("age")
note=request.form("note")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("sj1.mdb")
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from test"
rs.open sqlstr,conn,1,3
while not rs.eof
if rs("name").value=name then
response.write "失败"
else
rs.addnew
rs("name").value=name
rs("sex").value=sex
rs("age").value=age
rs("note").value=note
rs.update
rs.close
conn.close
set rs=nothing
set conn=nothing
response.write "记录添加成功!"
end if
rs.movenext
wend
%>
浏览器提示:红色的就是第20行
Microsoft OLE DB Provider for ODBC Drivers (0x80040E2F)
[Microsoft][ODBC Microsoft Access Driver]行中有错误
/reg.asp, 第 20 行
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1)
POST 36 ??? /reg.asp
name=&age=¬e=&Submit=%CC%E1%BD%BB
2005年12月29日, 上午 09:57:20