Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.SQLException: Column not found problem

807598Aug 18 2006 — edited Aug 18 2006
in following code i want to retreive the maximum serial number from Serial column and return it to caller .
          String query;
          query = "select MAX(Serial) from CMS..CMSLog";
          Statement st = con.createStatement();
           ResultSet rs = st.executeQuery(query);
           while (rs.next())
           {
            logserial = rs.getInt("1");
            }
           
           rs.close();
          con.close();
but i found following exception

java.sql.SQLException: Column not found



so plz help. what to do?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 15 2006
Added on Aug 18 2006
4 comments
87 views