怎样在ASP中在ACCESS数据库添加新数据
<%
id=request.Form("idtext")
name1=request.Form("nametext")
sex=request.Form("RadioGroup1")
borndate=request.Form("datetext")
phone=request.Form("phonetext")
address=request.Form("addresstext")
company=request.Form("dwtext")
email=request.Form("emailtext")
tel=request.Form("teltext")
set conn=server.CreateObject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("classmate.mdb")
set rs=server.CreateObject("adodb.recordset")
set rs1=server.CreateObject("adodb.recordset")
sql="select name from classmateinf where name='name1'"
rs.open sql,conn,1,1
if rs.eof or rs.bof then
sqlstr="insert into classmateinf(id,name,sex,borndate,tel,mobile,address,company,email) values('id','name1','sex&','borndate','tel&','phone','address','company','email')"
conn.Execute(sqlstr)
conn.close
set conn=nothing
%>
这段代码出错提示是:Microsoft JET Database Engine 错误 '80004005'
操作必须使用一个可更新的查询。
/asp/addmessage.asp,行20