[odb-users] Native SQL Query

Boris Kolpackov boris at codesynthesis.com
Wed Nov 20 05:12:16 EST 2013


Hi Mike,

Ok, I am pretty sure I know what's going on: you are using dynamic
multi-database support which does not support parameter binding in
native queries. Citing Section 16.2, "Dynamic Multi-Database Support":

"... Because of this database system-independent representation,
 dynamic support queries have a number of limitations. Specifically,
 dynamic queries do not support parameter binding in native query
 fragments."

Then it continues:

"... switching from dynamic to static mode can be an effective way
 to overcome these limitations..."

And shows an example of how to "switch-down" to static support in
order to execute a native query.

Also, generally speaking, running native queries in multi-database
mode will in most cases require doing it on the per-database basis
since things like SQL syntax, name/string quoting , etc., vary from
database to database.

Boris



More information about the odb-users mailing list