{"id":505,"date":"2012-11-11T19:33:45","date_gmt":"2012-11-11T19:33:45","guid":{"rendered":"http:\/\/ilias-laptop\/examples\/core-java\/sql\/scrollable-resultset-example\/"},"modified":"2013-05-11T20:24:07","modified_gmt":"2013-05-11T17:24:07","slug":"scrollable-resultset-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/","title":{"rendered":"Scrollable ResultSet example"},"content":{"rendered":"<p>In this example we shall show you how to create and use a scrollable ResultSet. To use a scrollable <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/sql\/ResultSet.html\" target=\"_blank\">ResultSet <\/a>one should perform the following steps:<\/p>\n<ul>\n<li>Load the JDBC driver, using the <code>forName(String className)<\/code> API method of the <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/lang\/Class.html\" target=\"_blank\">Class<\/a>. In this example we use the MySQL JDBC driver.<\/li>\n<li>Create a <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/sql\/Connection.html\" target=\"_blank\">Connection<\/a> to the database. Invoke the <code>getConnection(String url, String user, String password)<\/code> API method of the <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/sql\/DriverManager.html\" target=\"_blank\">DriverManager<\/a> to create the connection.<\/li>\n<li>Create a <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/sql\/Statement.html\" target=\"_blank\">Statement<\/a>, using the <code>createStatement()<\/code> API method of the Connection. The Statement must have the type ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_SCROLL_SENSITIVE and the concurrency ResultSet.CONCUR_UPDATABLE, in order to return scrollable result sets.<\/li>\n<li>Execute the query to the database, using the <code>executeQuery(String sql)<\/code> API method. The data produced by the given query is a ResultSet.<\/li>\n<li>Get the cursor position, with the <code>getRow()<\/code> API method and check if it is before the first row, with the <code>isBeforeFirst()<\/code> API method.<\/li>\n<li>Invoke the <code>next()<\/code> API method to move the cursor to next row, and <code>last()<\/code> API method to move cursor to the last row. In order to check if it is in the last row, we can call the <code>isLast()<\/code> API method.<\/li>\n<li>Move the cursor to the end of this ResultSet object, just after the last row, with the <code>afterLast()<\/code> API method and use the<code> isAfterLast()<\/code> API method to check if it is after the last row.<\/li>\n<li>Move cursor to other rows, with the <code>absolute(int row)<\/code> API method and check again its position.<\/li>\n<li>Invoke the <code>relative(int rows)<\/code> API method to move the cursor,<\/li>\n<\/ul>\n<p>as described in the code snippet below. <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush: java\">package com.javacodegeeks.snippets.core;\r\n\r\nimport java.sql.Connection;\r\nimport java.sql.DriverManager;\r\nimport java.sql.ResultSet;\r\nimport java.sql.SQLException;\r\nimport java.sql.Statement;\r\n\r\npublic class ScrollableResultSetExample {\r\n \r\n  public static void main(String[] args) {\r\n\r\n    Connection connection = null;\r\n    try {\r\n\r\n  \/\/ Load the MySQL JDBC driver\r\n\r\n  String driverName = \"com.mysql.jdbc.Driver\";\r\n\r\n  Class.forName(driverName);\r\n\r\n\r\n  \/\/ Create a connection to the database\r\n\r\n  String serverName = \"localhost\";\r\n\r\n  String schema = \"test\";\r\n\r\n  String url = \"jdbc:mysql:\/\/\" + serverName +  \"\/\" + schema;\r\n\r\n  String username = \"username\";\r\n\r\n  String password = \"password\";\r\n\r\n  connection = DriverManager.getConnection(url, username, password);\r\n\r\n  \r\n\r\n  System.out.println(\"Successfully Connected to the database!\");\r\n\r\n  \r\n    } catch (ClassNotFoundException e) {\r\n\r\n  System.out.println(\"Could not find the database driver \" + e.getMessage());\r\n    } catch (SQLException e) {\r\n\r\n  System.out.println(\"Could not connect to the database \" + e.getMessage());\r\n    }\r\n\r\n    try {\r\n\r\n\r\n  \/*\r\n\r\n    * An insensitive scrollable result set is one where the values captured in the \r\n\r\n    * result set never change, even if changes are made to the table from which the \r\n\r\n    * data was retrieved.\r\n\r\n    * A sensitive scrollable result set is one where the current values in the table \r\n\r\n    * are reflected in the result set. So if a change is made to a row in the table, \r\n\r\n    * the result set will show the new data when the cursor is moved to that row\r\n\r\n    *\/\r\n\r\n\r\n  \/\/ Create an insensitive scrollable result set (for sensitive scrollable result sets use ResultSet.TYPE_SCROLL_SENSITIVE directive)\r\n\r\n  Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\r\n\r\n  ResultSet results = statement.executeQuery(\"SELECT * FROM test_table\");\r\n\r\n\r\n  \/\/ Get cursor position\r\n\r\n  System.out.println(\"Cursor position \" + results.getRow() + \", is before first ? \" + results.isBeforeFirst());\r\n\r\n\r\n  \/\/ Every call to next() moves cursor to the next row - in this case the first row\r\n\r\n  results.next();\r\n\r\n\r\n  \/\/ Get cursor position\r\n\r\n  System.out.println(\"Cursor position \" + results.getRow() + \", is first ? \" + results.isFirst());\r\n\r\n\r\n  \/\/ A call to last() moves cursor to the last row; the row number is also the row count\r\n\r\n  results.last();\r\n\r\n\r\n  \/\/ Get cursor position\r\n\r\n  System.out.println(\"Cursor position \" + results.getRow() + \", is last ? \" + results.isLast());\r\n\r\n\r\n  \/\/ A call to after last moves cursor past last row (before first row)\r\n\r\n  results.afterLast();\r\n\r\n\r\n  \/\/ Get cursor position\r\n\r\n  System.out.println(\"Cursor position \" + results.getRow() + \", is after last ? \" + results.isAfterLast());\r\n\r\n\r\n  \/\/ Move cursor to the third row\r\n\r\n  results.absolute(3);\r\n\r\n\r\n  \/\/ Get cursor position\r\n\r\n  System.out.println(\"Cursor position \" + results.getRow());\r\n\r\n\r\n  \/\/ Move cursor to the last row\r\n\r\n  results.absolute(-1);\r\n\r\n\r\n  \/\/ Get cursor position\r\n\r\n  System.out.println(\"Cursor position \" + results.getRow() + \", is last ? \" + results.isLast());\r\n\r\n\r\n  \/\/ Move cursor to the forth last row\r\n\r\n  results.absolute(-4);\r\n\r\n\r\n  \/\/ Get cursor position\r\n\r\n  System.out.println(\"Cursor position \" + results.getRow());\r\n\r\n\r\n  \/\/ Move cursor down 5 rows from the current row.  If this moves\r\n\r\n  \/\/ cursor beyond the last row, cursor is put after the last row\r\n\r\n  results.relative(5);\r\n\r\n\r\n  \/\/ Get cursor position\r\n\r\n  System.out.println(\"Cursor position \" + results.getRow() + \", is after last ? \" + results.isAfterLast());\r\n\r\n\r\n  \/\/ Move cursor up 13 rows from the current row.  If this moves\r\n\r\n  \/\/ cursor beyond the first row, cursor is put before the first row\r\n\r\n  results.relative(-13);\r\n\r\n\r\n  \/\/ Get cursor position\r\n\r\n  System.out.println(\"Cursor position \" + results.getRow() + \", is before first ? \" + results.isBeforeFirst());\r\n\r\n\r\n} catch (SQLException e) {\r\n\r\n    System.out.println(\"Could not retrieve data from the database \" + e.getMessage());\r\n\r\n}\r\n\r\n  }\r\n}\r\n<\/pre>\n<p>\n<b>Example Output:<\/b><\/p>\n<pre style=\"background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;\">\r\n<code style=\"color: black; word-wrap: normal;\">Successfully Connected to the database!\r\nCursor position 0, is before first ? true\r\nCursor position 1, is first ? true\r\nCursor position 11, is last ? true\r\nCursor position 0, is after last ? true\r\nCursor position 3\r\nCursor position 11, is last ? true\r\nCursor position 8\r\nCursor position 0, is after last ? true\r\nCursor position 0, is before first ? true<\/code>\r\n<\/pre>\n<p>&nbsp;<br \/>\nThis was an example of how to create and use a scrollable ResultSet in Java.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this example we shall show you how to create and use a scrollable ResultSet. To use a scrollable ResultSet one should perform the following steps: Load the JDBC driver, using the forName(String className) API method of the Class. In this example we use the MySQL JDBC driver. Create a Connection to the database. Invoke &hellip;<\/p>\n","protected":false},"author":6,"featured_media":1204,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[189,1055],"class_list":["post-505","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql","tag-core-java-2","tag-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Scrollable ResultSet example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In this example we shall show you how to create and use a scrollable ResultSet. To use a scrollable ResultSet one should perform the following steps:Load\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Scrollable ResultSet example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In this example we shall show you how to create and use a scrollable ResultSet. To use a scrollable ResultSet one should perform the following steps:Load\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-11-11T19:33:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-05-11T17:24:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Byron Kiourtzoglou\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Byron Kiourtzoglou\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/\"},\"author\":{\"name\":\"Byron Kiourtzoglou\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015\"},\"headline\":\"Scrollable ResultSet example\",\"datePublished\":\"2012-11-11T19:33:45+00:00\",\"dateModified\":\"2013-05-11T17:24:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/\"},\"wordCount\":263,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"keywords\":[\"core java\",\"sql\"],\"articleSection\":[\"sql\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/\",\"name\":\"Scrollable ResultSet example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"datePublished\":\"2012-11-11T19:33:45+00:00\",\"dateModified\":\"2013-05-11T17:24:07+00:00\",\"description\":\"In this example we shall show you how to create and use a scrollable ResultSet. To use a scrollable ResultSet one should perform the following steps:Load\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"Bipartite Graph\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"sql\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/sql\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Scrollable ResultSet example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015\",\"name\":\"Byron Kiourtzoglou\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg\",\"caption\":\"Byron Kiourtzoglou\"},\"description\":\"Byron is a master software engineer working in the IT and Telecom domains. He is an applications developer in a wide variety of applications\/services. He is currently acting as the team leader and technical architect for a proprietary service creation and integration platform for both the IT and Telecom industries in addition to a in-house big data real-time analytics solution. He is always fascinated by SOA, middleware services and mobile development. Byron is co-founder and Executive Editor at Java Code Geeks.\",\"sameAs\":[\"https:\/\/www.pivotalgamers.com\/\",\"https:\/\/www.linkedin.com\/in\/byron-kiourtzoglou-530ab222\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/byron-kiourtzoglou\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Scrollable ResultSet example - Java Code Geeks","description":"In this example we shall show you how to create and use a scrollable ResultSet. To use a scrollable ResultSet one should perform the following steps:Load","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/","og_locale":"en_US","og_type":"article","og_title":"Scrollable ResultSet example - Java Code Geeks","og_description":"In this example we shall show you how to create and use a scrollable ResultSet. To use a scrollable ResultSet one should perform the following steps:Load","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-11-11T19:33:45+00:00","article_modified_time":"2013-05-11T17:24:07+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","type":"image\/jpeg"}],"author":"Byron Kiourtzoglou","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Byron Kiourtzoglou","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/"},"author":{"name":"Byron Kiourtzoglou","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015"},"headline":"Scrollable ResultSet example","datePublished":"2012-11-11T19:33:45+00:00","dateModified":"2013-05-11T17:24:07+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/"},"wordCount":263,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","keywords":["core java","sql"],"articleSection":["sql"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/","name":"Scrollable ResultSet example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","datePublished":"2012-11-11T19:33:45+00:00","dateModified":"2013-05-11T17:24:07+00:00","description":"In this example we shall show you how to create and use a scrollable ResultSet. To use a scrollable ResultSet one should perform the following steps:Load","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","width":150,"height":150,"caption":"Bipartite Graph"},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/scrollable-resultset-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/"},{"@type":"ListItem","position":4,"name":"sql","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/sql\/"},{"@type":"ListItem","position":5,"name":"Scrollable ResultSet example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015","name":"Byron Kiourtzoglou","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg","caption":"Byron Kiourtzoglou"},"description":"Byron is a master software engineer working in the IT and Telecom domains. He is an applications developer in a wide variety of applications\/services. He is currently acting as the team leader and technical architect for a proprietary service creation and integration platform for both the IT and Telecom industries in addition to a in-house big data real-time analytics solution. He is always fascinated by SOA, middleware services and mobile development. Byron is co-founder and Executive Editor at Java Code Geeks.","sameAs":["https:\/\/www.pivotalgamers.com\/","https:\/\/www.linkedin.com\/in\/byron-kiourtzoglou-530ab222"],"url":"https:\/\/examples.javacodegeeks.com\/author\/byron-kiourtzoglou\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=505"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/505\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1204"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}