Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> java.sql.SQLException: Fail to convert to internal representation

java.sql.SQLException: Fail to convert to internal representation

From: <karebare_at_wpi.edu>
Date: 14 Dec 2005 07:48:58 -0800
Message-ID: <1134575338.288213.29340@g43g2000cwa.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US