asp+access insert into 数据报错,请高手帮忙
userid=session("user")dimrecordsetconn1=server.createobject("adodb.connection")conn1....
userid=session("user")
dim record
set conn1=server.createobject("adodb.connection")
conn1.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("DB.mdb")
set rs1=server.createobject("adodb.recordset")
exec1="select *from userinfo where(userid='"&userid&"')"
rs1.open exec1,conn1,1,1
record=rs1("username")
rs1.Close
conn1.Close
set conn1=nothing
lmname=request.form("lmname")
scnum=request.form("scnum")
sctime=request.form("sctime")
bcstate=request.form("bcstate")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("DB.mdb")
exec="insert into brocast(lmname,scnum,sctime,bcstate,record)values('"+lmname+"','"+scnum+"','"+sctime+"','"+bcstate+"','"+record"')"
conn.execute exec
conn.close
set conn=nothing
response.write("记录成功") 展开
dim record
set conn1=server.createobject("adodb.connection")
conn1.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("DB.mdb")
set rs1=server.createobject("adodb.recordset")
exec1="select *from userinfo where(userid='"&userid&"')"
rs1.open exec1,conn1,1,1
record=rs1("username")
rs1.Close
conn1.Close
set conn1=nothing
lmname=request.form("lmname")
scnum=request.form("scnum")
sctime=request.form("sctime")
bcstate=request.form("bcstate")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("DB.mdb")
exec="insert into brocast(lmname,scnum,sctime,bcstate,record)values('"+lmname+"','"+scnum+"','"+sctime+"','"+bcstate+"','"+record"')"
conn.execute exec
conn.close
set conn=nothing
response.write("记录成功") 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询