I have a problem using ResultSet.getInt() method, each call returns an exception:
org.apache.derby.client.am.SqlException: Invalid operation:
wasNull() called with no data retrieved
       at org.apache.derby.client.am.ResultSet.wasNull(Unknown Source)

The code is
       ResultSetMetaData RSMD = RS.getMetaData();
       int INTcols = RSMD.getColumnCount();
       String STRtemp = null;
       while(RS.next())
       {
String STRvalue = new String(); for(int INTcol = 1; INTcol <= INTcols; INTcol++)
           {
int INTdummy = RSMD.getColumnType(INTcol); switch((int)RSMD.getColumnType(INTcol))
               {
                       if(!RS.wasNull()) // raises exception
{ STRvalue = "" + RSaktuelles.getInt(INTcol); } ...
       }
        }
   }

what can I do to avoid this exception

tom

Reply via email to