我作三参架构系统,在中间层出现一个问题
  procedure GetUnit_id(Var P_unit_name:OleVariant;Out P_unit_Id:OleVariant):OleVariant;
  begin
    try
      setcomplete;
    except
      setAbort;
    end;
  end;在运行时,Setcomplete,setAbort  老是过不去,我在uses 中也加上了MTx也不行,
请高手指点指点,谢谢!!!

解决方案 »

  1.   

    procedure SetComplete;DescriptionCall SetComplete to indicate that the MTS Automation object no longer needs to maintain state information. After calling SetComplete, the MTS Automation object is deactivated when the current method call exits.If the MTS Automation object is part of a transaction, SetComplete indicates that this part of the transaction can commit. If MTS started the transaction automatically when the client called the MTS Automation object抯 methods, MTS tries to commit the transaction when the current method exits.Note: This transaction may still fail if the current transaction included another MTS object that called SetAbort or DisableCommit.