public boolean open(int maxRows){
  log.info("MaxRows=" + maxRows);
  m_maxRows=maxRows;
  if (m_open) {
    log.fine("already open");
    dataRefreshAll();
    return true;
  }
  if (m_virtual) {
    verifyVirtual();
  }
  createSelectSql();
  if (m_SQL == null || m_SQL.equals("")) {
    log.log(Level.SEVERE,"No SQL");
    return false;
  }
  m_loader=new Loader();
  m_rowCount=m_loader.open(maxRows);
  if (m_virtual) {
    m_buffer=null;
    m_virtualBuffer=new HashMap<Integer,Object[]>(210);
  }
 else {
    m_buffer=new ArrayList<Object[]>(m_rowCount + 10);
  }
  m_sort=new ArrayList<MSort>(m_rowCount + 10);
  if (m_rowCount > 0) {
    if (m_rowCount < 1000)     m_loader.run();
 else {
      m_loaderThread=new Thread(m_loader,"TLoader");
      m_loaderThread.start();
    }
  }
 else   m_loader.close();
  m_open=true;
  m_changed=false;
  m_rowChanged=-1;
  m_inserting=false;
  return true;
}

public boolean open ( int maxRows ) { log . info ( "MaxRows=" + maxRows ) ; m_maxRows = maxRows ; if ( m_open ) { log . fine ( "already open" ) ; dataRefreshAll ( ) ; return true ; } if ( m_virtual ) { verifyVirtual ( ) ; } createSelectSql ( ) ; if ( m_SQL == null || m_SQL . equals ( "" ) ) { log . log ( Level . SEVERE , "No SQL" ) ; return false ; } m_loader = new Loader ( ) ; m_rowCount = m_loader . open ( maxRows ) ; if ( m_virtual ) { m_buffer = null ; m_virtualBuffer = new HashMap < Integer , Object [ ] > ( 210 ) ; } else { m_buffer = new ArrayList < Object [ ] > ( m_rowCount + 10 ) ; } m_sort = new ArrayList < MSort > ( m_rowCount + 10 ) ; if ( m_rowCount > 0 ) { if ( m_rowCount < 1000 ) m_loader . run ( ) ; else { m_loaderThread = new Thread ( m_loader , "TLoader" ) ; m_loaderThread . start ( ) ; } } else m_loader . close ( ) ; m_open = true ; m_changed = false ; m_rowChanged = - 1 ; m_inserting = false ; return true ; }
open database . if already opened , data is refreshed
