[odb-users] Native SQL Query

Mike Ruffing mike.ruffing at ipconfigure.com
Wed Nov 20 08:36:50 EST 2013


Boris,

We are using dynamic multi-database support and that was the issue.

Thanks for the update and reference.

Mike    

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Wednesday, November 20, 2013 5:12 AM
To: Mike Ruffing
Cc: odb-users at codesynthesis.com
Subject: Re: [odb-users] Native SQL Query

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