以下ASP+access插入数据代码错在哪里?
strsql="InsertIntoweb_product(p_class,p_name,p_code,p_price,p_detail,p_pic,p_smallpic...
strsql="Insert Into web_product(p_class,p_name, p_code, p_price, p_detail, p_pic, p_smallpic, p_symbol, p_size, p_weight, p_face, p_place, p_producer, mn_id) values("
strsql=strsql & "" & strClass & ", "
strsql=strsql & "'" & strName & "', "
strsql=strsql & "'" & upload.Form("txtCode") & "', "
strsql=strsql & "" & strPrice & ", "
strsql=strsql & "'" & strContent & "', "
strsql=strsql & "'" & strPic & "', "
strsql=strsql & "'" & strSmallPic & "',"
strsql=strsql & "'" & upload.Form("txtsymbol") & "', "
strsql=strsql & "'" & upload.Form("txtsize") & "', "
strsql=strsql & "'" & upload.Form("txtweight") & "', "
strsql=strsql & "'" & upload.Form("txtface") & "', "
strsql=strsql & "'" & upload.Form("txtplace") & "', "
strsql=strsql & "'" & upload.Form("txtproducer") & "', "
strsql=strsql & "'" & upload.Form("mnid") & "' )" 展开
strsql=strsql & "" & strClass & ", "
strsql=strsql & "'" & strName & "', "
strsql=strsql & "'" & upload.Form("txtCode") & "', "
strsql=strsql & "" & strPrice & ", "
strsql=strsql & "'" & strContent & "', "
strsql=strsql & "'" & strPic & "', "
strsql=strsql & "'" & strSmallPic & "',"
strsql=strsql & "'" & upload.Form("txtsymbol") & "', "
strsql=strsql & "'" & upload.Form("txtsize") & "', "
strsql=strsql & "'" & upload.Form("txtweight") & "', "
strsql=strsql & "'" & upload.Form("txtface") & "', "
strsql=strsql & "'" & upload.Form("txtplace") & "', "
strsql=strsql & "'" & upload.Form("txtproducer") & "', "
strsql=strsql & "'" & upload.Form("mnid") & "' )" 展开
1个回答
展开全部
<%
dim name,company,tel,fax,mobile,email,homepage,content,password,ip
name=safeRequest("name",0,"")
company=safeRequest("company",0,"")
tel=safeRequest("tel",0,"")
fax=safeRequest("fax",0,"")
email=safeRequest("email",0,"")
mobile=safeRequest("mobile",0,"")
homepage=safeRequest("homepage",0,"")
content=safeRequest("content",0,"")
content=replace(content,vbCrLf,"<br>")
password=safeRequest("password",0,"")
ip=request.servervariables("remote_addr")
sqlcmd="insert into gbook (name,company,tel,fax,mobile,email,homepage,content,ip) values ('"&name&"','"&company&"','"&tel&"','"&fax&"','"&mobile&"','"&email&"','"&homepage&"','"&content&"','"&ip&"')"
conn.execute sqlcmd
conn.close
set conn=nothing
%>
这个可能对你有帮助!!
dim name,company,tel,fax,mobile,email,homepage,content,password,ip
name=safeRequest("name",0,"")
company=safeRequest("company",0,"")
tel=safeRequest("tel",0,"")
fax=safeRequest("fax",0,"")
email=safeRequest("email",0,"")
mobile=safeRequest("mobile",0,"")
homepage=safeRequest("homepage",0,"")
content=safeRequest("content",0,"")
content=replace(content,vbCrLf,"<br>")
password=safeRequest("password",0,"")
ip=request.servervariables("remote_addr")
sqlcmd="insert into gbook (name,company,tel,fax,mobile,email,homepage,content,ip) values ('"&name&"','"&company&"','"&tel&"','"&fax&"','"&mobile&"','"&email&"','"&homepage&"','"&content&"','"&ip&"')"
conn.execute sqlcmd
conn.close
set conn=nothing
%>
这个可能对你有帮助!!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询