学无止境

try

   ...

  except

  on e:exception do

      begin

        //出错回滚

        dm.OraSession.Rollback;

        MessageBox(Handle,pchar(e.message),'保存出错',MB_OK + MB_ICONSTOP);

        //恢复事务自动提交

        dm.OraSession.AutoCommit := true;

        OraQuery1.AutoCommit := true;

        StringGrid1.SetFocus();

        StringGrid1.Row := 1;

        StringGrid1.Col := 3;

        exit;

      end;

  end;

posted on 2011-09-07 15:52  DHT  阅读(384)  评论(0编辑  收藏  举报