java - is there any way to fetch n number of record start form x row? -


I want to get 50 records from the table, which has millions of records without limits

I did the following

  MySQLConnection () creates a private zero throws SQLException {CachedRowSet crs = new CachedRowSetImpl (); Connection Conn = Null; Description stmt = null; Try {class.forName ("com.mysql.jdbc.Driver"); Conn = DriverManager.getConnection ("jdbc: mysql: // localhost: 3306 / mydb", "root", "root"); Conn.setAutoCommit (wrong); Crs.setPageSize (100); Crs.setUsername ("root"); Crs.setPassword ("Glass4 # 21"); Crs.setCommand ("Select * trn_22_gouk_final_attendance"); Crs.absolute (10); Crs.setFetchSize (10); Crs.execute (Conn); While (crs.next ()) {System.out.println (crs.getObject (1)); }} Hold (from eclipsection) {se.printStackTrace (); } Hold (exception e) {e.printStackTrace (); } Finally {crs.close (); }}   

but it does not work ... any suggestions

thanks in advance

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -