docs: public synchronized void fixCounter(FieldTable table)
      {
          PKeyArea vKeyArea = this.getPKeyArea(Constants.MAIN_KEY_AREA);
          KeyAreaInfo keyArea = table.getRecord().getKeyArea(Constants.MAIN_KEY_AREA);
          try   {
              BaseBuffer buffer = vKeyArea.doMove(Constants.LAST_RECORD, table, keyArea);
              if (buffer == null)
                  m_iCounter = table.getRecord().getStartingID();
              else
              {
                  buffer.bufferToFields(table.getRecord(), Constants.DONT_DISPLAY, Constants.READ_MOVE);
                  Object data = table.getRecord().getCounterField().getData();
                  if (data instanceof Integer)
                      m_iCounter = Math.max(m_iCounter, ((Integer)data).intValue() + 1);
              }
              // Now set the pointer back at the first record
              buffer = vKeyArea.doMove(Constants.FIRST_RECORD, table, keyArea);
              if (buffer != null)     // If not at EOF (empty) back up one record
                  vKeyArea.doMove(Constants.PREVIOUS_RECORD, table, keyArea);
          } catch (DBException ex)    {
              // Ignore error
          }
      }