B
Benji
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?
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?