Package

Source Code of TestData

import java.sql.ResultSet;
import java.sql.SQLException;

import com.xrb.mysql.data.impl.FetchDataImpl;
import com.xrb.mysql.data.page.Page;


public class TestData {

  public static int count;
  /**
   * @param args
   * @throws SQLException
   */
  public static void main(String[] args) throws SQLException {
    // TODO Auto-generated method stub
    FetchDataImpl data = new FetchDataImpl();
    String sql = "SELECT * FROM USER";
    ResultSet result = data.queryBySql(sql);
    while(result.next()){
      System.out.println(result.getString(1)+" "+result.getString(2)+" "+result.getString(3)+" "+result.getString(4)+" "+result.getString(5));
      count = result.getRow();
    }
    System.out.println(count);
    Page page = new Page(10, 1, true);
    page.setTotalRecordCount(count);
  }

}
TOP

Related Classes of TestData

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.