|
Hi Werner, Thank
you for taking the time… I
have a CastorOQLQuery class acting as a parser to prepare the final SQL command
string for OQLQuery creation. My CastorOQLQuery is passed the relevant Database
and has SQL command portions appended to it until all portions are complete.
When the string is complete, I call the getOQLQuery method that binds a passed
value to the newly created OQLQuery. A typical example is this: class CastorOQLQuery { //
An example “built” SQL command string. //
This changes from instance to instance. String
mySQLString = “SELECT s FROM my_table s WHERE s.name like $1”; public
OQLQuery getOQLQuery(Database databaseIn, String valueIn) { OQLQuery
returnQuery = databaseIn.getOQLQuery(mySQLString); returnQuery.bind(valueIn); return
returnQuery; } } I
will create the OQLQuery with a call to the method above: OQLQuery
oql = myCastorOQLQuery.getOQLQuery(myDatabase, “myDesiredValue”); When I subsequently call oql.execute( ) I
will often get the following exception when the underlying table I am searching
contains Integer fields: Caught exception
org.exolab.castor.jdo.PersistenceException: Nested error:
java.sql.SQLException: Unknown type '246 in column 1 of 89 in binary-encoded
result set. while executing …. When I look at column 1 in the table, it
is an integer type with a primary key (although it will also happen on integer
fields that are not keys). Important note: All of this code works
using the exact same 0.9.6 Castor/doclets/jdom package with MySQL Connector/J
3.1.7 and MySQL 4.X. As soon as I upgrade the MySQL service to use 5.0, the
error occurs. Additional important note: As mentioned
earlier, I have no problem accessing the integer columns via the mySQL command
line client or through regular statement calls made directly to the connection. What am I missing here? Thanks again! From: Werner Guttmann
[mailto:[EMAIL PROTECTED] Michael, |
- [castor-user] Problems with OQLQuery result set using MySQ... Michael Stabler
- Re: [castor-user] Problems with OQLQuery result set u... Werner Guttmann
- RE: [castor-user] Problems with OQLQuery result set u... Michael Stabler
- FW: [castor-user] Problems with OQLQuery result set u... Michael Stabler
- RE: [castor-user] Problems with OQLQuery result set u... Michael Stabler
- RE: [castor-user] Problems with OQLQuery result set u... Werner Guttmann

