请帮我看一下,我头都大了
错误类型:
ADODB.Connection (0x800A0E79)
/admin/save.asp, 第 59 行
也就是这行"conn.execute(sql)"
代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="CP_ACP"%>
<!--#include file=conn.asp-->
<!--#include file=../inc/error.asp-->
<%
function changechr(str)
changechr=replace(replace(replace(replace(str,"<","<"),">",">"),chr(13),"<br>")," "," ")
end function
dim shopname,eshop,contact,tel,mtel,email,stadd,bankcou,bankname,aboutus,company,trans,payment,expl,employ,agent,sql
shopname=request.form("shopname")
ehsop=request.form("ehsop")
contact=request.form("contact")
tel=request.form("tel")
mtel=request.form("mtel")
email=request.form("email")
stadd=request.form("stadd")
bankcou=request.form("bankcou")
bankname=request.form("bankname")
company=changechr(request.form("company"))
aboutus=changechr(request.form("aboutus"))
trans=changechr(request.form("trans"))
payment=changechr(request.form("payment"))
expl=changechr(request.form("expl"))
employ=changechr(request.form("employ"))
agent=changechr(request.form("agent"))
if shopname="" or contact="" or tel="" then
errmsg=errmsg+"<br>"+"<li>留言项目尚未填写完毕!"
founderr=true
end if
if company="" then
errmsg=errmsg+"<br>"+"<li>公司简介未填写完毕!"
founderr=true
end if
if aboutus="" then
errmsg=errmsg+"<br>"+"<li>关于我们未填写完毕!"
founderr=true
end if
if trans="" then
errmsg=errmsg+"<br>"+"<li>运输说明未填写完毕!"
founderr=true
end if
if payment="" then
errmsg=errmsg+"<br>"+"<li>付款方式未填写完毕!"
founderr=true
end if
if expl="" then
errmsg=errmsg+"<br>"+"<li>购物说明未填写完毕!"
founderr=true
end if
if agent="" then
errmsg=errmsg+"<br>"+"<li>合作代理未填写完毕!"
founderr=true
end if
if founderr=true then
call error()
response.End()
end if
sql="insert into jbzl(shopname,eshop,contact,tel,mtel,email,stadd,bankcou,bankname,aboutus,company,trans,payment,expl,employ,agent)"
sql="sql&valu('"&shopname&"','"&eshop&"','"&contact&"','"&tel&"','"&mtel&"','"&email&"','"&stadd&"','"&bankcou&"','"&bankname&"','"&aboutus&"','"&company&"','"&trans&"','"&payment&"','"&expl&"','"&employ&"','"&agent&"')"
conn.execute(sql)
response.write"<SCRIPT language=JavaScript>alert('资料保存成功!') , this.location.href='view.asp'</SCRIPT>"
conn.close
set conn=nothing
%>
问题点数:40、回复次数:5Top
1 楼roam831(漫步闲停)回复于 2003-09-02 21:57:08 得分 0
上面那个values是我没拷好
大家看看哪里错了?Top
2 楼zurong(★★★★★)回复于 2003-09-02 22:05:13 得分 40
sql=sql&"values('"&shopname&"','"&eshop&"','"&contact&"','"&tel&"','"&mtel&"','"&email&"','"&stadd&"','"&bankcou&"','"&bankname&"','"&aboutus&"','"&company&"','"&trans&"','"&payment&"','"&expl&"','"&employ&"','"&agent&"')"
Top
3 楼zurong(★★★★★)回复于 2003-09-02 22:06:09 得分 0
sql=sql&" values('"&shopname&"','"&eshop&"','"&contact&"','"&tel&"','"&mtel&"','"&email&"','"&stadd&"','"&bankcou&"','"&bankname&"','"&aboutus&"','"&company&"','"&trans&"','"&payment&"','"&expl&"','"&employ&"','"&agent&"')"Top
4 楼roam831(漫步闲停)回复于 2003-09-02 22:10:04 得分 0
哦,老天啊
晕死啊
谢谢这位兄弟了Top
5 楼somecom(真彩无敌)回复于 2003-09-02 22:12:49 得分 0
晕!为何不用
rs.addnew
rs("field1")=request("tmp1")
rs("field2")=request("tmp2")
...............
rs.update
就算出错了,也好查呀,,,
Top



