Seems an odd way to do this. Why issue individual update statements as you iterate through your result set rather then one after you have iterated through your result set? What you are doing has a lot of unecessary database round trips. e.g.
i have only one result set object and that is rs and i did not specify rs.close() anywhere in my code my complete program is
id 7 name survey
java.sql.SQLException: ResultSet is closed
at sun.jdbc.odbc.JdbcOdbcResultSet.checkOpen(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.next(Unknown Source)
If there are unnecessary round trips then the output should be slow but here i am getting an odd message saying ResultSet closed and the while loop is not iterating through all the records fetched it just shows one record from the System.out.println ("id"+id+"name"+name).
Updating a result set as you iterate through it would usually be done with an updatable results set, which is not somthing Access supports. I wouldn't be surprised if your update is also causing the result set to be closed.
i did not specify rs.close() anywhere in my code my complete program is
This is very bad practice. You should always release JDBC resources in a finally block.