Sounds like the query used a SQL expression or syntax not supported in FileMaker. You might check the ODBC and JDBC Guide available in FileMaker's help menu under product documentation.
It's got to be something else. After connecting to the database, I provide a simple query: SELECT * FROM Contacts
I get the following error:
ERROR [HY000] [FileMaker][FileMaker] No cursor open for statement