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 -> "Fail to convert to internal representation" Error

"Fail to convert to internal representation" Error

From: Benji <gamhead_at_hotmail.com>
Date: 18 Dec 2003 09:01:12 -0800
Message-ID: <edb0928a.0312180901.62c0a75@posting.google.com>


Hi guys,

I'm getting this error:

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

When trying to prepare a statement in Java using the OracleJDBC_classes12.jar

Code is:

    String query =

    "SELECT " + DB_VIEW_SPOTRANGES + "." + DB_FIELD_DOCUMENTID + ", "

+ DB_VIEW_SPOTRANGES + "." + DB_FIELD_BIPRODUCT + ", "
+ DB_VIEW_SPOTRANGES + "." + DB_FIELD_MINTRADE + ", "
+ DB_VIEW_SPOTRANGES + "." + DB_FIELD_MAXTRADE + ", "
+ DB_VIEW_SPOTRANGES + "." + DB_FIELD_CLOSESPOT + ", "
+ DB_VIEW_SPOTRANGES + "." + DB_FIELD_REPORTDATE + ", "
+ DB_VIEW_SPOTRANGES + "." + DB_FIELD_TIMEZONE + ", "
+ DB_VIEW_SPOTRANGES + "." + DB_FIELD_VERIFIED
+ " FROM " + DB_VIEW_SPOTRANGES + " WHERE " + DB_VIEW_SPOTRANGES + "." + DB_FIELD_DOCUMENTID + " = ? ORDER BY " + DB_VIEW_SPOTRANGES + "." + DB_FIELD_BIPRODUCT; Which I can see from my logs becomes

SELECT SPOTRANGES.DocumentID, SPOTRANGES.Biproduct, SPOTRANGES.MinTrade, SPOTRANGES.MaxTrade, SPOTRANGES.CloseSpot, SPOTRANGES.ReportDate, SPOTRANGES.TimeZone, SPOTRANGES.Verified FROM SPOTRANGES WHERE SPOTRANGES.DocumentID = ? ORDER BY SPOTRANGES.Biproduct

....

          Prepared stmt = dbConn.prepareStatement(query);
          BigDecimal b = new BigDecimal(documentID);
          ResultSet rslt = stmt.executeQuery();

...where documentID is an "int"

I've looked about and I seem to be doing the right thing. This is how I've approached the problem in the past.

Any ideas? Received on Thu Dec 18 2003 - 11:01:12 CST

Original text of this message

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