Hi ,
I am trying to access cetain data from the database.
once I retrieve the data I have to process dat data and then update a particular column using the modified data.
I used the following code.
Statement stmt=null;
ResultSet rs=null;
rs = stmt.executeQuery("select data from table where id = 2");
while(rs.next()){
String description= rs.getString("data");
String overview=description.substring(description.indexOf("<Overview>")+10,description.indexOf("</Overview"));
String updateString = "update table " +
"set data= '"+overview+"' " +
"where id = 2 ";
int x= stmt.executeUpdate(updateString);
System.out.println("query updated");
}
I am getting the followng exception.........
java.sql.SQLException: ResultSet is closed
Please help me in solving the problem......
Thank you in advance
Vidhi