3 Replies Latest reply: Aug 12, 2014 8:24 PM by Alex.Keh .Product.Manager-Oracle RSS

    Oracle.ManagedDataAccess gives ORA-01006 if there are bind variables in comments but only on even lines.

    user8034871

      When I upgrade from ODP.NET to the Managed ODP.NET some of my queries starts throwing errors about missing bind variables.

      I've reproduced it with a simple example that uses one bind variable called :unitName

      This is the sample SQL:

       

      SELECT

        :unitName

      FROM

        DUAL

       

      Now if I add a comment to the beginning of the SQL like this:

       

      -- Text with :unitName

      SELECT

        :unitName

      FROM

        DUAL

       

      it works, but if I have a bind variable in a comment that is on an "even" line number, I get the ORA-01006:

      This causes the error:

       

      -- First line comment

      -- Text with :unitName

      SELECT

        :unitName

      FROM

        DUAL

       

      Regards,

      -Tommy