PB中调用存储过程完整编程
String ls_Proc Long ll_Count,ll_flag String ls_Id String ls_return ls_Proc = 'USP_PROC' SELECT Count(*) INTO :ll_count from sysobjects where name = :ls_Proc and xtype = 'P'; If ll_Count <= 0 Then messagebox("错误",'错误信息:存储过程' + ls_Proc + '不存在!') Return -1 End If DECLARE Emp_proc1 procedure for USP_PROC @Shop_ID = :ls_Id,@return_id = :ls_return OUTPUT; EXECUTE Emp_proc1 into :ls_return; If Sqlca.Sqlcode < 0 Then messagebox("错误","错误信息:" + Sqlca.SqlErrText) Close Emp_proc1 ; return -1 else
fetch Emp_proc into :ls_return; if ll_flag <> 0 then //messagebox("提示信息",ls_return) close Emp_proc ; return -1 End if |