Page 1 of 1

Problem with special symbols in ExecSQL

Posted: Tue 14 Feb 2017 12:02
by Freezer_86
Hello,

I findout that ODAC got problem with using special symbols in table names.
I got table which named like "СКЛАД СІМ'Ї" (i know that it's not a good practice, but Oracle supports it).
When i use this table in TOraQuery (select * from "СКЛАД СІМ'Ї"), it's works perfectly.
But when i try to use it in PL/SQL block, like this:

Code: Select all

    Session.ExecSQL( 'begin ' + #13#10 +
                     '  select idgroup, parent, parentfield        ' + #13#10 +
                     '  into :p_idgroup, :p_parent, :p_parentfield ' + #13#10 +
                     '  from "СКЛАД СІМ'Ї"      ' + #13#10 +
                     '  where idobject = :p_idobject;              ' + #13#10 +
                     'end;',
                     [ FGroupID, FParentID, FParentField, ObjectID
                     ]
                   );
It's raise exception "Compilation is not possible".

Strange, but PL/SQL Developer exec it fine, so problem not in Oracle:

Code: Select all

begin 
  select idgroup, parent, parentfield        
  into :p_idgroup, :p_parent, :p_parentfield 
  from "СКЛАД СІМ'Ї"      
  where idobject = :p_idobject;              
end;
Problem is in ' - symbol, because with all other tables all works fine.
P.S. Odac version 9.6.20 in direct mode, Oracle Database 10g Enterprise Edition Release 10.2.0.3.0

Re: Problem with special symbols in ExecSQL

Posted: Fri 24 Feb 2017 08:26
by Freezer_86
Hello again,

Did you reproduce error?
Maybe you need something from my side (test case or ... whatever)?

Re: Problem with special symbols in ExecSQL

Posted: Wed 01 Mar 2017 10:36
by MaximG
We fixed the error related to using in a query a table which has quotes in its name. The fix will be included in the next ODAC build.