捕捉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;                     

  

原文地址:https://www.cnblogs.com/hnxxcxg/p/14084594.html