asp rs.update 莫名其妙代码就不执行了 55
Functiondb_OrderCount(user_id,user_api_id,agent_id,count_user_rmb,count_sys_rmb,count...
Function db_OrderCount(user_id,user_api_id,agent_id,count_user_rmb,count_sys_rmb,count_pay_rmb,count_agent_rmb,count_date,order_order_id)
set rs=server.CreateObject("adodb.recordset")
sql="select * from xb_OrderCount where user_id='"&user_id&"' and user_api_id='"&user_api_id&"' and count_date='"&count_date&"'"
rs.open sql,conn,1,3
if rs.eof then
rs.addnew
rs("user_id")=user_id
rs("user_api_id")=user_api_id
rs("agent_id")=agent_id
rs("count_date")=count_date
else
end if
rs("count_agent_rmb")=Cdbl(rs("count_agent_rmb"))+Cdbl(count_agent_rmb)
rs("count_user_rmb")=Cdbl(rs("count_user_rmb"))+Cdbl(count_user_rmb)
rs("count_sys_rmb")=Cdbl(rs("count_sys_rmb"))+Cdbl(count_sys_rmb)
rs("count_pay_rmb")=Cdbl(rs("count_pay_rmb"))+Cdbl(count_pay_rmb)
db_OrderCount=1
Call my_WriteFile("log/"&order_order_id&"-1-初始定义-"&db_OrderCount&".txt","")
//随机的代码执行到这个位置就不执行了
确认以上更新的参数 传递数值都没问题
rs.update
rs.close
set rs=nothing
db_OrderCount=err.number
Call my_WriteFile("log/"&order_order_id&"-2-更新返回-"&db_OrderCount&".txt","")
End function
比如更新1000条数据 会漏掉那么几条 数据,漏的数据没任何规律 展开
set rs=server.CreateObject("adodb.recordset")
sql="select * from xb_OrderCount where user_id='"&user_id&"' and user_api_id='"&user_api_id&"' and count_date='"&count_date&"'"
rs.open sql,conn,1,3
if rs.eof then
rs.addnew
rs("user_id")=user_id
rs("user_api_id")=user_api_id
rs("agent_id")=agent_id
rs("count_date")=count_date
else
end if
rs("count_agent_rmb")=Cdbl(rs("count_agent_rmb"))+Cdbl(count_agent_rmb)
rs("count_user_rmb")=Cdbl(rs("count_user_rmb"))+Cdbl(count_user_rmb)
rs("count_sys_rmb")=Cdbl(rs("count_sys_rmb"))+Cdbl(count_sys_rmb)
rs("count_pay_rmb")=Cdbl(rs("count_pay_rmb"))+Cdbl(count_pay_rmb)
db_OrderCount=1
Call my_WriteFile("log/"&order_order_id&"-1-初始定义-"&db_OrderCount&".txt","")
//随机的代码执行到这个位置就不执行了
确认以上更新的参数 传递数值都没问题
rs.update
rs.close
set rs=nothing
db_OrderCount=err.number
Call my_WriteFile("log/"&order_order_id&"-2-更新返回-"&db_OrderCount&".txt","")
End function
比如更新1000条数据 会漏掉那么几条 数据,漏的数据没任何规律 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询