Integer pvar_int = new Integer(0);
String pvar_str = new String(); SQLCursor select_t1 = new SQLCursor ("select int_col, char_col from T1"); Select_t1.open(); Select_t1.fetch(); while(select_t1.found()) { // Assign values from the current row of the SQL result set // to the procedure variables. First check whether // the values fetched are null. If null then explicitly // set the procedure variables to null. if ((select_t1.wasNULL(1)) == true) pvar_int = null; else pvar_int = (Integer)select_t1.getValue(1, INTEGER); if ((select_t1.wasNULL(2)) == true) pvar_str = null; else pvar_str = (String)select_t1.getValue(1, CHAR); } |