Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Beginner
Apr 29, 2002

Make a ResultSet Scrollable


This code can also be used to navigate through the Resultset backward or forward, or to perform insertions, deletions and updates to update the database.
 
 //load JDBC Driver
// Get the Connection
Statement
stmt=connection.createStatement
(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.
CONCUR_UPDATABLE);
ResultSet resultset=stmt.executeQuery("SQL .." );
resultset.absolute(3);//Moves the cursor to the  given row number.
resultset.previous();//Moves the cursor to the previous row.
Savitha Satyanarayana
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date