When I execute a query with the following OQL statement:

    select count(t.id) from model.Test t where (status = $1) and (showDate <= $2)

An exception occurs:

    org.exolab.castor.jdo.QueryException: java.sql.SQLException: Syntax error or 
access violation message from server: "You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right syntax to use near 
'2 ))' at line 1"

I didn't change anything of my code or database, so I guess it is not my problem.

The final sql is something like this:

    SELECT  COUNT(test.id)   FROM test WHERE (( test.status = ?1 ) and ( test.showDate 
<= ?2 ))

Can anyone provide me a solution to fix it?

Thanks,
Sean
----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to