想提交表单添加数据到数据库,并在另张网页以表格形式显示的ASP代码是什么
<%dimconn,a,b,c,d,e,fsetconn=server.createobject("adodb.connection")conn.open"provide...
<%
dim conn,a,b,c,d,e,f
set conn=server.createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("master.mdb")
a=request.form("t1")
b=request.form("t2")
c=request.form("t3")
d=request.form("t4")
e=request.form("t6")
f=request.form("t7")
sql="insert into user(uname,telephone,E-mail,upass,reupass,address) values('"& uname &"','"& telephone &"','"& E-mail &"','"& upass &"','"& reupass &"','"& address &"')"
conn.execute sql
response.write "成功"
conn.close
%>
出现错误如下:
错误类型:
Microsoft JET Database Engine (0x80004005)
/denglu.asp, 第 12 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6.4; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727)
页:
POST 50 bytes to /denglu.asp
POST 数据:
t1=&t2=&t3=&t4=&t5=&t6=&button2=%E6%8F%90%E4%BA%A4 展开
dim conn,a,b,c,d,e,f
set conn=server.createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("master.mdb")
a=request.form("t1")
b=request.form("t2")
c=request.form("t3")
d=request.form("t4")
e=request.form("t6")
f=request.form("t7")
sql="insert into user(uname,telephone,E-mail,upass,reupass,address) values('"& uname &"','"& telephone &"','"& E-mail &"','"& upass &"','"& reupass &"','"& address &"')"
conn.execute sql
response.write "成功"
conn.close
%>
出现错误如下:
错误类型:
Microsoft JET Database Engine (0x80004005)
/denglu.asp, 第 12 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6.4; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727)
页:
POST 50 bytes to /denglu.asp
POST 数据:
t1=&t2=&t3=&t4=&t5=&t6=&button2=%E6%8F%90%E4%BA%A4 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询