interview questions and answers

Java Interview Questions | JDBC Interview Questions

Home interview questions JAVA interview questions JDBC 
Friday, 10 September 2010
Main Menu
Home
Online Test
Contest
Search
Submit
FAQs
Testimonial
Contact Us
Login
Most Popular Category
JAVA

Microsoft Technologies
ASP, C#, DotNet, ...

Programming
C++, PHP, VB, ...

SAP

Testing

Web Technologies

Polls
Does personal networking help in job search?
 
IT Placement Papers interview questions JAVA interview questions JDBC

This category contains JDBC Interview Questions and Answers


How to update a resultset programmatically? (new feature in JDBC 2.0)

PDF Print E-mail

a. create a scrollable and updatable ResultSet object. Statement stmt = con.createStatement (ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet uprs = stmt.executeQuery("SELECT COLUMN_1, COLUMN_2 FROM TABLE_NAME"); b. move the cursor to the specific position and use related method to update data and then, call updateRow() method. uprs.last(); uprs.updateFloat("COLUMN_2", 25.55);//update last row's data uprs.updateRow();//don't miss this method, otherwise, // the data will be lost.




Be first to comment this article

Only registered users can write comments.
Please login or register.

 
< Prev   Next >

Java Interview Questions | JDBC Interview Questions

Top!
Top!
Copyright © 2008 InterviewDuniya.com All Rights Reserved.
Partner Site: Maheshwari Matrimony