关于ASP Insert 语句的问题 5
<body><formname="tianjia"method="POST"action=""><table><tr><td>商品号:<inputtype="text"n...
<body>
<form name="tianjia" method="POST" action="">
<table>
<tr><td>商品号:<input type="text" name="sph"/>*</td></tr>
<tr><td>商品名:<input type="text" name="spm"/>*</td></tr>
<tr><td>生产厂商:<input type="text" name="sccs" />*</td></tr>
<tr><td>生产日期:<input type="text" name="scrq"/>*</td></tr>
<tr><td>单价:<input type="text" name="dj" />元*</td></tr>
<tr><td>库存数量:<input type="text" name="kcsl" />*</td></tr>
<tr><td>生产区域:<select name="scqy">
<option>东区</option>
<option>南区</option>
<option>西区</option>
<option>北区</option>
</select></td></tr>
</table>
<input type="submit" name="queding" value="添加" />
</form>
<%
if Request.Form("sph")<>"" And Request.Form("spm")<>"" And Request.Form("sccs")<>"" And Request.Form("scrq")<>"" And Request.Form("dj")<>"" And Request.Form("kcsl")<>"" Then
Dim a,b,c,d,e,f,g
a=Request.Form("sph")
b=Request.Form("spm")
c=Request.Form("sccs")
d=Request.Form("scrq")
e=Request.Form("dj")
f=request.form("kcsl")
g=request.form("scqy")
response.Write a
response.Write d
response.Write g
<!-- #include file="lrqbixu.asp" -->
Dim strSql
strsql="inert into liangruqi(lrq商品号,lrq商品名,lrq生产厂商,lrq生产日期,lrq单价,lrq库存数量,lrq存放区域) values('"& a &"','"& b &"','"& c &"',#'"& d &"'#,'"& e &"','"& f &"','"& g &"')"
conn.Execute(strSql)
Response.Redirect "lrqzhuye.asp"
end if
%>
conn.Execute(strSql) 这一句错误 展开
<form name="tianjia" method="POST" action="">
<table>
<tr><td>商品号:<input type="text" name="sph"/>*</td></tr>
<tr><td>商品名:<input type="text" name="spm"/>*</td></tr>
<tr><td>生产厂商:<input type="text" name="sccs" />*</td></tr>
<tr><td>生产日期:<input type="text" name="scrq"/>*</td></tr>
<tr><td>单价:<input type="text" name="dj" />元*</td></tr>
<tr><td>库存数量:<input type="text" name="kcsl" />*</td></tr>
<tr><td>生产区域:<select name="scqy">
<option>东区</option>
<option>南区</option>
<option>西区</option>
<option>北区</option>
</select></td></tr>
</table>
<input type="submit" name="queding" value="添加" />
</form>
<%
if Request.Form("sph")<>"" And Request.Form("spm")<>"" And Request.Form("sccs")<>"" And Request.Form("scrq")<>"" And Request.Form("dj")<>"" And Request.Form("kcsl")<>"" Then
Dim a,b,c,d,e,f,g
a=Request.Form("sph")
b=Request.Form("spm")
c=Request.Form("sccs")
d=Request.Form("scrq")
e=Request.Form("dj")
f=request.form("kcsl")
g=request.form("scqy")
response.Write a
response.Write d
response.Write g
<!-- #include file="lrqbixu.asp" -->
Dim strSql
strsql="inert into liangruqi(lrq商品号,lrq商品名,lrq生产厂商,lrq生产日期,lrq单价,lrq库存数量,lrq存放区域) values('"& a &"','"& b &"','"& c &"',#'"& d &"'#,'"& e &"','"& f &"','"& g &"')"
conn.Execute(strSql)
Response.Redirect "lrqzhuye.asp"
end if
%>
conn.Execute(strSql) 这一句错误 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询