Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> java.sql.SQLException: Fail to convert to internal representation
I have a java progam that is connecting to an Oracle SQL server. All
of my program works except for the following where I get the error that
is posted as the subject.
if(selection.getSelectedItem().toString().equals("Expiration Date Query"))
{ String all = "SELECT OEXPDATE FROM ISORDEREDON WHERE OINUM=" + Integer.parseInt(expDateQ.getText()); String results = ""; try { r = stmt.executeQuery (all); // execute the query int i = 0; while (r.next ()) { p.add(i, r.getInt ("oExpDate")); i = i+1; p.setSize(i); }
} catch (SQLException sqlEx) {
System.out.println ("Could not get results:" + sqlEx.toString ());
}
if(p.size() == 0) { JOptionPane.showMessageDialog(showTable, "Item Expiration Date not in system");
}
else{ Object [] myArray = new Object [p.size()-1]; myArray = p.toArray(); results = results + "Expiration Date = "; for(int i = 0; i < myArray.length; i = i + 1) { results = results + myArray[i] + "\n";
}
}
return results; }
Any ideas?? Thanks! Received on Wed Dec 14 2005 - 09:48:58 CST
![]() |
![]() |