青岛埠外医院:这段代码的错误在哪里,请指教,谢谢!

来源:百度文库 编辑:高考问答 时间:2024/04/29 08:08:42
下面这段代码执行之后access数据库中c_id字段中没有任何数据,请问错在哪里?
sub flea_put()
dim srings,scolor,area,where,mobile,cb_var,topic,id
dim istop,nname,remark,email,price,url,phone,tim,ispic,types,pic,timed
if chk() then
integral_del=0
cb_var=""
topic=code_admin("topic",1,50)
remark=code_admin("remark",1,500)
csid=trim(request.form("c_id"))
types=code_admin("types",1,8)
tim=joekoe_cms.now_time
pic=code_admin("pic",1,100)
ispic=true
if pic="" then
ispic=false
else
integral_del=etp
end if
price=trim(request.form("price"))
url=trim(request.form("url"))
phone=trim(request.form("phone"))
email=trim(request.form("email"))
nname=trim(request.form("nname"))
mobile=trim(request.form("mobile"))
area=request.form("area")
where=request.form("where")
timed=request.form("timed")
scolor=trim(request.form("scolor"))
srings=trim(request.form("sRings"))
if len(scolor) > 1 then
if len(scolor)<>6 then
found_err=found_err&"+请输入正确的 <font class=red>颜色代码</font> !(请正确填写<font class=red2>6</font>位颜色代码)

<br>"
else
cb_var=" 彩虹灯 "
if integral_del=0 then
integral_del=etc
else
integral_del=int(integral_del)+int(etc)
end if
end if
end if
istop=0
if srings>0 then
dim int_s
istop=1
int_s=int(srings)*int(etb)
if integral_del=0 then
integral_del=int(int_s)
else
integral_del=int(integral_del)+int(int_s)
end if
cb_var=cb_var&" 救生圈 "
end if
......
call chk_cid_sid()
sql="select * from flea where id is null"
call joekoe_cms.exec("",-1)
rs.open sql,conn,1,3
rs.addnew
rs("c_id")=cid
rs("s_id")=sid
rs("topic")=topic
rs("types")=types
rs("username")=login_username
rs("tim")=tim
rs("counter")=0
rs("istop")=istop
rs("hidden")=false
rs("pic")=pic
rs("ispic")=ispic
rs("remark")=remark
rs("price")=price
rs("url")=url
rs("phone")=phone
rs("email")=email
rs("nname")=nname
rs("istop")=istop
rs("timed")=timed
rs("srings")=srings
rs("scolor")=scolor
rs("area")=area
rs("where")=where
rs("mobile")=mobile
rs("lastr")=date()
rs.update
id=rs("id")
rs.close:set rs=nothing
call upload_note(index_url,first_id("flea","id"))
call admin_msg("发布")
exit sub
end if

ispic=joekoe_cms.rand_file("flea")
dim u_mail,u_int
sql="select email,integral from user_data where username='"&login_username&"'"
set rs=conn.execute(sql)
u_mail=rs(0)
u_int=rs(1)
rs.close
call form_first()
response.write vbcrlf&flea_bar_top("发布信息",1)
谢楼上,应该是没有正确的取到值。c_id和s_id代码中有啊,就是csid=trim(request.form("c_id"))
...
rs("c_id")=cid
rs("s_id")=sid

cid? sid? 在你发上来的代码里怎么没有? 怎么帮你?
最后的办法是用response.write cid 看下值是多少
然后把变量名看一下 是不是上页和本页的名字有错误 还是未正确的取到值
我真的没看到那个cid在哪 不知道说的这些能不能帮到你
不对吧csid=trim(request.form("c_id"))
难道这个就是cid 和sid 你可能理解有错误