PROCEDURE
在後台寫好,就裡只是調用:
PROCEDURE name:ADMIN.EM_COMP_MONPAY2
DECLARE
monpay2_proc PROCEDURE FOR
ADMIN.EM_COMP_MONPAY2 (:gs_factno,:ls_yymm,:ls_phase,:ls_pnlno ) ;//參數
EXECUTE monpay2_proc;
//錯誤提示
choose case sqlca.sqlcode
case 100,0
MESSAGEBOX('訊息!','計算完成!!')
case -1
ll_pos = pos(SQLCA.SQLERRTEXT,"ORA-06512")
ll_pos1 = pos(SQLCA.SQLERRTEXT,"ORA-20002")
Messagebox("輸入資料錯誤~",MID(SQLCA.SQLERRTEXT,ll_pos1 + 10 ,ll_pos - ll_pos1 -10),stopsign!)
Messagebox("輸入資料錯誤~",SQLCA.SQLERRTEXT,stopsign!)
end choose
close
monpay2_proc;// 關閉