Back to Browse

Lesson - 19 : JDBC - ScrollableResultSet in JDBC

560 views
Apr 22, 2017
17:08

Types of ResultSets in JDBC They are two types of ResultSets in JDBC Non Scrollable ResultSet: By default a ResultSet is non scrollableA non scrollable resultset can allows the cursor to move only in forward direction. Syntax for non-scrollable :Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("SQL command"); Scrollable ResultSet: A scrollable resultset allows the cursor to move in both forward and backward and random directions. Comparatively the performance of scrollable resultset is better than non scrollable. To make a resultset of jdbc as scrollable we need to pass Type and Mode integer values as parameters while creating a statement object.Syntax for scrollable :Statement stmt = con.create Satement(int type, int mode) ; Resultset rs = stmt.executeQuery("SQL command");

Download

1 formats

Video Formats

360pmp427.0 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Lesson - 19 : JDBC - ScrollableResultSet in JDBC | NatokHD