Weird Invalid column type
Hey guys
I was wandering if you could help me with this one.
I use jdk 1.4 and Oracle 9i and currently building a simple application
Which saves data to a DataBase. All was going well until one day I
Suddenly got this exception while trying to save information which was
Working fine just the other day:
SQLException : java.sql.SQLException: Invalid column type
I have searched my code and DB for days trying to find my mistake, and
Couldn't find it, even my most experienced colleagues tried and failed.
The types and nulls allowed are all correct.
Since then this problem popped up in another few places which the save
Was working fine just a few days ago. I have searched and googled high
And low and couldn't find an answer, could anyone help me?
It's a pretty straight forward message that means you are attempting to use an Oracle datatype that is not supported by the JDBC driver. I have not personally gotten that message for any other reason, but your usage may be different then mine.. Not much help there I know, but with that in mind:
Is it possible to show a code snippet where the error occurs?
Is it possible to show the full Exception information?
Ist it possible to showthe stack trace when the error occurs?
Sorry I don't have an immediate answer for you.
Yes, sorry for the lack of info, i was just in a hurry
here ais the code were i insert the data:
UPDATE pdrecord#Army SET needsMedicalInquiry = ?, needsCommity = ?,
assignedProfessionComment = ? WHERE personId=636
as you can see I insert to the prepared statement the variables needsMedicalInquiry a boolean value and then this exception pops up:
java.sql.SQLException: Invalid column type
at oracle.jdbc.dbaccess.DBError,throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError,throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError,throwSqlException(DBError.java:269)
at oracle.jdbc.driver.oraclePerparedStatement.setObject(OraclePerparedStatement.java:3088)
at oracle.jdbc.driver.oraclePerparedStatement.setObject(OraclePerparedStatement.java:3107)
at erp.services.pdrecord.server.PDRecordCollection.doUDATEQuery(PDRecordCollection.java:285)
of course there are more lines of the error message but it is not relevant
> as you can see I insert to the prepared statement the
> variables needsMedicalInquiry a boolean value and
> then this exception pops up:
What might have been helpful and relevant was to the see the code that uses the setXXX methods.
Your text says you are using a boolean value and Oracle doesn't support the boolean datatype / column type, so that could be why you are getting the error message.