为什么我的数据插入不进数据库啊,请高手帮帮忙!!!!在线等
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
else
if request.cookies("Buy2Buy")("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
end if
end if
if session("rank")>2 then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('你无权添加修改退伙信息!');history.go(-1);</script>"
response.End
end if
if request.form("name")="" then
conn.close
set conn = nothing
response.Write "<script language=javascript>alert('请填写姓名!');history.go(-1);</script>"
response.End
end if
dim action,id,i,strmeto
id=SafeRequest("id",1)
action=FormatSQL(SafeRequest("action",0))
select case action
case "add"
For i = 1 To Request.Form("meto").Count
strmeto = strmeto & Request.Form("meto")(i)
Next
sql="Insert into tuihuo(danweiid,name,jiari,xiujia,zhuyuan,kaihui,qita,datetime,overtime,heji,jine,meto,adddate) values('"&trim(request.form("danweiid"))&"','"&trim(request.form("name"))&"','"&trim(request.form("jiari"))&"',"&trim(request.form("xiujia"))&","&trim(request.form("zhuyuan"))&","&trim(request.form("kaihui"))&","&trim(request.form("qita"))&","&trim(request.form("datetime"))&","&trim(request.form("overtime"))&","&trim(request.form("heji"))&",'"&trim(request.form("jine"))&"','"&trim(request.form("meto"))&"',"&now&"')"
'response.write sql
'response.end
conn.execute(sql)
response.Write "<script language=javascript>alert('添加成功!');history.go(-1);</script>"
response.End
case "edit"
For i = 1 To Request.Form("meto").Count
strmeto = strmeto & Request.Form("meto")(i)
Next
sql = "Update tuihuo set danweiid='"&trim(request.form("danweiid"))&"',name='"&trim(request.form("name")) &"',jiari='"&trim(request.form("jiari")) &"',xiujia="&trim(request.form("xiujia")) &",zhuyuan="&trim(request.form("zhuyuan")) &",kaihui="&trim(request.form("kaihui")) &",qita="&trim(request.form("qita"))&",datetime="&trim(request.form("datetime")) &",overtime="&trim(request.form("overtime")) &",heji="&trim(request.form("heji")) &",jine='"&trim(request.form("jine")) &"',meto='"&trim(request.form("meto"))&"' where id="&id
'response.write sql
'response.end
conn.execute(sql)
response.Write "<script language=javascript>alert('修改成功!');history.go(-1);</script>"
response.End
end select
%>
运行后增加的提示是
Insert into tuihuo(danweiid,name,jiari,xiujia,zhuyuan,kaihui,qita,datetime,overtime,heji,jine,meto,adddate) values('2','ffffffff','