Đang chuẩn bị liên kết để tải về tài liệu:
murachs Java SE 2010 phần 10

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Các trang kết hợp không được thực hiện. Trang tay trái được cho là đã mô tả, trang tay phải, luôn luôn được gọi là một 'con số' ngay cả khi nó là tất cả các văn bản, có: (a) một bản tóm tắt mô tả, (b) một bảng (c .) rất ít dòng mã, thường là trong bối cảnh, | Chapter 21 How to use JDBC to work with databases 737 Methods of a Resultset object that work with a result set Method Description beforeFirst 0 Moves the cursor before the first row in this result set afterLast 0 first 0 Moves the cursor after the last row in this result set. Moves the cursor to the first row in this result set. previous next Moves the cursor to the previous row in this result set. Moves the cursor to the next row in this result set. last 0 absolute intRow Moves the cursor to the last row in this result set. Moves the cursor to the row specified by the int value where 1 is the first row 2 is the second row and so on. relative intRow Moves the cursor the number of rows specified relative to the current row. isBeforeFirst 0 Returns a true value if the cursor is positioned before the first row. isAfterLast 0 isFirst 0 isLast Returns a true value if the cursor is positioned after the last row. Returns a true value if the cursor is positioned on the first row. Returns a true value if the cursor is positioned on the last row. close 0 Releases the result set s JDBC and database resources. getRow Returns an int value that identifies the current row of the result set. How to work with a forward-only result set while rs.next 0 . code that works with each record How to work with a scrollable result set rs.first rs.last 0 if rs.isFirst false rs.previous if rs.isLastO false rs.next rs.absolute 4 rs.relative -2 rs.relative 3 Description When you create a result set the cursor is positioned before the first record. As a result the first time you call the next method it will move to the first record in the result set. The first previous next last absolute and relative methods all return a true value if the new row exists and a false value if the new row doesn t exist or the result set is empty. All of the methods in this figure throw an exception of the SQLException type. Figure 21-11 How to move the cursor through a result set 738 Section 5 Data access .