2,596
社区成员
发帖
与我相关
我的任务
分享
///生成临时表
ls_sql = "create table #temp_rcvord (" + &
"rcv char(40) not null," + &
"ord char(40) not null," + &
"item int not null," + &
"dat datetime not null," + &
"priceterm char(10) null)"
EXECUTE IMMEDIATE :ls_sql USING SQLCA;
sqlca.of_commit()
lb_temp = true
//
FOR k = 1 to upperbound(ll_rowcount)
li_itemid = dw_form.getitemNumber(ll_rowcount[k],"pchs_ordit_id")
sqlca.autocommit = true
DECLARE up_temp PROCEDURE FOR up_pchsord_genrcv //使用到临时表#temp_rcvord
@arg_ordid = :ls_ordid,
@arg_item = :li_itemid
Using sqlca;
Execute up_temp;
If SQLCA.sqlcode < 0 then
messagebox("提醒","!")
lb_temp = false
end if
sqlca.autocommit = false
CLOSE up_temp ;
sqlca.of_commit()
next
IF lb_temp then
DECLARE up_temp1 PROCEDURE FOR up_pchsord_rcvafter //使用到临时表#temp_rcvord
using sqlca;
Execute up_temp1 ;
CLOSE up_temp1 ;
sqlca.of_commit()
End if
IF lb_temp then
messagebox("成功","!")
End if
//删除临时表
ls_sqldrop = "drop table #temp_rcvord"
EXECUTE IMMEDIATE :ls_sqldrop USING SQLCA;
sqlca.of_commit()