According to the feedback of the users this driver has been broken with regards to the query handling. By looking into the details I've fixed a couple of issues, like:
- Added a default implementation of LayerResultsGetShape? (causing a systematic failure as of the single-pass query implementation)
- Changed the query shape to POINT instead of POLYGON when the area of the query shape is zero (causing a failure at the server).
- Fixed the buffer length when creating the query shape (to prevent from the memory corruption error).
- Added advanced error reporting (ODBC errors) on the msDebug output.
- Added the OID to the field list of the query select statement (causing errors when retrieving the columns).
These changes along with fixes for several further issues will are available to download from http://vbkto.dyndns.org/sdk/
Any feedback and further testing efforts would be helpful, before we issue the next stable release, MapServer 5.6.2 (hopefully in the next week)