经典ASP的问题。。。还有人用吗?
用户页面上,用Javascript插入的表,用户填好后,提交,用asp如何回写到DB?我是这么写的:
for i = 1 to Request.Form("TQCITY").Count
TQDATE = Request.Form("TQDATE")(i)
TQCITY = Request.Form("TQCITY")(i)
TQDES = Request.Form("TQDES")(i)
TQAMOUNT = Request.Form("TQAMOUNT")(i)
TQTOTALAMOUNT = Request.Form("TQTOTALAMOUNT")(i)
strSQL = "INSERT PBB_HRPAYMENT_TQ xxx"
objCn.Execute strSql
Next
但是不正确。why
------解决方案--------------------strSQL = "INSERT PBB_HRPAYMENT_TQ xxx"
语句执行成功了?
------解决方案--------------------For i=1 To i_Total
i_id =Request.Form("id")(i)
m_order =Request.Form("order_num")(i)
m_name =Request.Form("name")(i)
Conn.Execute "Update [Scs_menu] Set name='"&m_name&"',order_num="&m_order&" Where menu_id ="&i_Id
Next
正常使用中
------解决方案--------------------哪句越界了?检查写名称是不是写错了
------解决方案--------------------建议检查名称是不是有误??
------解决方案--------------------Request.Form("XXXX")(i) 确定是和TQCITY的数量一致? 用firebug查一下递交的数据对不对
------解决方案--------------------
TQDATE = Cdate(Request.Form("TQDATE")(i))?
------解决方案--------------------i由0开始。结束是Request.Form("TQCITY").Count-1
------解决方案--------------------初步对sql和next表示怀疑