|Home |Login |Registration |Struts Step by Step Tutorial |Hibernate Step by Step Tutorial |Spring Step by Step Tutorial |JSP Step by Step Tutorial |JDBC Step by Step Tutorial |Web Services Step by Step Tutorial |EJB fundamentals | ORACLE Step by Step Tutorial | SCJP 5.0 and SCJP 6.0 Study Guide | SCWCD 5.0 Study Guide | SCJP Tips
Java mock test | SCJP mock test | SCJP DUMP | SCBCD mock test |Java online test exam | JSP online test | ORACLE online test | Hibernate online test | Servlet online test | Struts online test | EJB online test | C online test | C++ online test | Aptitude online test

Java interview questions | JSP interview questions | ORACLE interview questions | Hibernate interview questions | Servlet interview questions | Struts interview questions | JDBC interview questions | C/C++ interview questions | Spring interview questions | JMS interview questions | Informatica interview questions | EJB interview questions | OOPS and Design Pattern interview questions
1600 PMP mock questions 1400 CAPM mock questions 800 SCJP 6 mock questions 600 OCAJP 7 mock questions 590 OCPJP 7 mock questions 556 SCWCD 5 mock questions 500 OCEJWCD 6 mock questions pdfDownload (java,struts, hibernet etc) JobsJobs and Walkins

 

Recent Questions

!!! JDBC Frequently Asked Questions !!!

How can you move the cursor in scrollable result sets?

SCJP 1.5/1.6 Exam Kit

!!!Answer!!!- From Technical Expert

One of the new features in the JDBC 2.0 API is the ability to move a result set?s cursor backward as well as forward. There are also methods that let you move the cursor to a particular row and check the position of the cursor.

Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet srs = stmt.executeQuery(?SELECT COF_NAME, PRICE FROM COFFEES?);

The first argument is one of three constants added to the ResultSet API to indicate the type of a ResultSet object: TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE , and TYPE_SCROLL_SENSITIVE. The second argument is one of two ResultSet constants for specifying whether a result set is read-only or updatable: CONCUR_READ_ONLY and CONCUR_UPDATABLE. The point to remember here is that if you specify a type, you must also specify whether it is read-only or updatable. Also, you must specify the type first, and because both parameters are of type int , the compiler will not complain if you switch the order. Specifying the constant TYPE_FORWARD_ONLY creates a nonscrollable result set, that is, one in which the cursor moves only forward. If you do not specify any constants for the type and updatability of a ResultSet object, you will automatically get one that is TYPE_FORWARD_ONLY and CONCUR_READ_ONLY.

Answered By : null Replied Date : Mar 31 2012
Answer :


Answered By : null Replied Date : Feb 5 2012
Answer :


Answered By : null Replied Date : Jan 15 2012
Answer :


Answered By : null Replied Date : Dec 31 2011
Answer :


Answered By : null Replied Date : Nov 16 2011
Answer :


Answered By : null Replied Date : Nov 13 2011
Answer :


Answered By : null Replied Date : Nov 2 2011
Answer :


Answered By : null Replied Date : Nov 1 2011
Answer :


Answered By : null Replied Date : Sep 18 2011
Answer :


Answered By : null Replied Date : Aug 6 2011
Answer :


Answered By : null Replied Date : Jun 22 2011
Answer :


Answered By : null Replied Date : Jun 17 2011
Answer :


Answered By : null Replied Date : May 28 2011
Answer :


Answered By : null Replied Date : Apr 24 2011
Answer :


Answered By : null Replied Date : Mar 25 2011
Answer :


Answered By : null Replied Date : Mar 5 2011
Answer :


Answered By : null Replied Date : Feb 22 2011
Answer :


Answered By : null Replied Date : Feb 20 2011
Answer :


Answered By : null Replied Date : Jan 23 2011
Answer :


Answered By : null Replied Date : Jan 23 2011
Answer :


Answered By : null Replied Date : Jan 15 2011
Answer :


Answered By : null Replied Date : Dec 27 2010
Answer :


Answered By : null Replied Date : Nov 22 2010
Answer :


Answered By : null Replied Date : Nov 12 2010
Answer :


Answered By : null Replied Date : Nov 6 2010
Answer :


Answered By : null Replied Date : Sep 11 2010
Answer :


Answered By : null Replied Date : Sep 10 2010
Answer :


Answered By : null Replied Date : Sep 9 2010
Answer :


Answered By : null Replied Date : Sep 8 2010
Answer :


Answered By : null Replied Date : Sep 3 2010
Answer :


Answered By : null Replied Date : Aug 10 2010
Answer :


Answered By : null Replied Date : Apr 25 2012
Answer :


Answered By : null Replied Date : May 21 2012
Answer :


Answered By : null Replied Date : Jun 29 2012
Answer :


Answered By : null Replied Date : Jul 29 2012
Answer :


Answered By : null Replied Date : Jul 30 2012
Answer :


Answered By : null Replied Date : Sep 11 2012
Answer :


Answered By : null Replied Date : Sep 24 2012
Answer :


Answered By : null Replied Date : Oct 10 2012
Answer :


Answered By : null Replied Date : Nov 9 2012
Answer :


Answered By : null Replied Date : Feb 17 2013
Answer :


Answered By : null Replied Date : Feb 17 2013
Answer :


Answered By : null Replied Date : Feb 19 2013
Answer :


Answered By : null Replied Date : Apr 26 2013
Answer :


Answered By : null Replied Date : Apr 27 2013
Answer :


 

You can also contribute to this answer:

Your Name:
Answer:

 
Ask Question and get answer from Expert.
View Answers List from Expert.

The information you are posting should be related to java and ORACLE technology. Not political.