asp插入数据库问题
<%ifrequest.QueryString("liu")="liu"thendimLtitle,rsw,strsql,Lname,Lemail,LQQ,Ldizhi,...
<%
if request.QueryString("liu")="liu" then
dim Ltitle,rsw,strsql,Lname,Lemail,LQQ,Ldizhi,Contect,sqlw
Ltitle=CheckStr(trim(request.form("Ltitle")))
Lname=CheckStr(trim(request.form("Lname")))
Lemail=CheckStr(trim(request.form("Lemail")))
LQQ=CheckStr(trim(request.Form("LQQ")))
Ldizhi=CheckStr(trim(request.Form("Ldizhi")))
Contect=CheckStr(trim(request.form("Contect")))
set rsw=server.createobject("adodb.recordset")
sqlw="insert into Liuyan(Lname,Ltitle,Lemail,LQQ,Ldizhi,Contect) Values ('"&Lname&"','"&Ltitle&"','"&Lemail&"','"&LQQ&"','"&Ldizhi&"','"&Contect&"')"
rsw.open sqlw,conn,1,1
response.write("<script language='javascript'>alert('留言成功,等待管理员审核!');location.href='message.asp'</script>")
怎么没有插入到数据库里啊
if request.QueryString("liu")="liu" then
dim Ltitle,rsw,strsql,Lname,Lemail,LQQ,Ldizhi,Contect,sqlw
Ltitle=CheckStr(trim(request.form("Ltitle")))
Lname=CheckStr(trim(request.form("Lname")))
Lemail=CheckStr(trim(request.form("Lemail")))
LQQ=CheckStr(trim(request.Form("LQQ")))
Ldizhi=CheckStr(trim(request.Form("Ldizhi")))
Contect=CheckStr(trim(request.form("Contect")))
sqlw="insert into Liuyan(Lname,Ltitle,Lemail,LQQ,Ldizhi,Contect) Values ('"&Lname&"','"&Ltitle&"','"&Lemail&"','"&LQQ&"','"&Ldizhi&"','"&Contect&"')"
conn.execute(sqlw)
response.write("<script language='javascript'>alert('留言成功,等待管理员审核!');location.href='message.asp'</script>")
else 展开
if request.QueryString("liu")="liu" then
dim Ltitle,rsw,strsql,Lname,Lemail,LQQ,Ldizhi,Contect,sqlw
Ltitle=CheckStr(trim(request.form("Ltitle")))
Lname=CheckStr(trim(request.form("Lname")))
Lemail=CheckStr(trim(request.form("Lemail")))
LQQ=CheckStr(trim(request.Form("LQQ")))
Ldizhi=CheckStr(trim(request.Form("Ldizhi")))
Contect=CheckStr(trim(request.form("Contect")))
set rsw=server.createobject("adodb.recordset")
sqlw="insert into Liuyan(Lname,Ltitle,Lemail,LQQ,Ldizhi,Contect) Values ('"&Lname&"','"&Ltitle&"','"&Lemail&"','"&LQQ&"','"&Ldizhi&"','"&Contect&"')"
rsw.open sqlw,conn,1,1
response.write("<script language='javascript'>alert('留言成功,等待管理员审核!');location.href='message.asp'</script>")
怎么没有插入到数据库里啊
if request.QueryString("liu")="liu" then
dim Ltitle,rsw,strsql,Lname,Lemail,LQQ,Ldizhi,Contect,sqlw
Ltitle=CheckStr(trim(request.form("Ltitle")))
Lname=CheckStr(trim(request.form("Lname")))
Lemail=CheckStr(trim(request.form("Lemail")))
LQQ=CheckStr(trim(request.Form("LQQ")))
Ldizhi=CheckStr(trim(request.Form("Ldizhi")))
Contect=CheckStr(trim(request.form("Contect")))
sqlw="insert into Liuyan(Lname,Ltitle,Lemail,LQQ,Ldizhi,Contect) Values ('"&Lname&"','"&Ltitle&"','"&Lemail&"','"&LQQ&"','"&Ldizhi&"','"&Contect&"')"
conn.execute(sqlw)
response.write("<script language='javascript'>alert('留言成功,等待管理员审核!');location.href='message.asp'</script>")
else 展开
展开全部
既然是用insert into语句,把
set rsw=server.createobject("adodb.recordset")
sqlw="insert into Liuyan(Lname,Ltitle,Lemail,LQQ,Ldizhi,Contect) Values ('"&Lname&"','"&Ltitle&"','"&Lemail&"','"&LQQ&"','"&Ldizhi&"','"&Contect&"')"
rsw.open sqlw,conn,1,1
改为:
sqlw="insert into Liuyan(Lname,Ltitle,Lemail,LQQ,Ldizhi,Contect) Values ('"&Lname&"','"&Ltitle&"','"&Lemail&"','"&LQQ&"','"&Ldizhi&"','"&Contect&"')"
conn.execute(sqlw)
set rsw=server.createobject("adodb.recordset")
sqlw="insert into Liuyan(Lname,Ltitle,Lemail,LQQ,Ldizhi,Contect) Values ('"&Lname&"','"&Ltitle&"','"&Lemail&"','"&LQQ&"','"&Ldizhi&"','"&Contect&"')"
rsw.open sqlw,conn,1,1
改为:
sqlw="insert into Liuyan(Lname,Ltitle,Lemail,LQQ,Ldizhi,Contect) Values ('"&Lname&"','"&Ltitle&"','"&Lemail&"','"&LQQ&"','"&Ldizhi&"','"&Contect&"')"
conn.execute(sqlw)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询