捕捉TZConnection断线异常

捕捉TZConnection断线异常

  try
    qry.Close;
    qry.open;
  except
    on e: exception do
      if (e is EZSQLException) and (e.message = 'DBError : [20006] : Write to the server failed')  then
      begin
        ZConnection1.Reconnect;
      end;
  end;                     

  

posted @ 2020-12-04 10:52  delphi中间件  阅读(272)  评论(0)    收藏  举报