在的存储过程最后 加一条
select 1 [FLAG]
然后 a=FR.remoteEvaluate('SQL("ODS","'+sql+'",1,1)'); 判断一下a如果为1 则更新成功
-----------------------------
另外给个建议把你的SQL放在一个事务里面集中提交,如果任意一步出错回滚日志即可示例如下(上面的a=0就是失败,a=1就成功):
CREATE PROCEDURE <Procedure_Name, sysname, ProcedureName>
-- Add the parameters for the stored procedure here
<@Param1, sysname, @p1> <Datatype_For_Param1, , int> = <Default_Value_For_Param1, , 0>,
<@Param2, sysname, @p2> <Datatype_For_Param2, , int> = <Default_Value_For_Param2, , 0>
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
BEGIN TRY
BEGIN TRANSACTION
/*你现在的SQL insert\UPDATE\DELETE */
SELECT 1 [FLAG]
COMMIT TRANSACTION ----上面的SQL全部提交
END TRY
BEGIN CATCH
SELECT 0 [FLAG]
ROLLBACK TRANSACTION----上面的SQL任意一处出错,回滚日志撤销所有操作
END CATCH
END