2 Replies Latest reply on Dec 11, 2012 7:35 AM by philmodjunk

    ExecuteSQL SELECT does not work with column names with underscore prefix?

    ErikToh

      Title

      ExecuteSQL SELECT does not work with column names with underscore prefix?

      Post

           This works:

           

      ExecuteSQL( "SELECT CustomerName FROM CUSTOMER"; char(9); char(13) )

           This doesn't:

           

      ExecuteSQL( "SELECT __kp_CustomerID FROM CUSTOMER"; char(9); char(13) )

           This doesn't work either, it just returns "__kp_CustomerID" as a literal:

           

      ExecuteSQL( "SELECT ? FROM CUSTOMER"; char(9); char(13); "__kp_CustomerID" )

           Revising the second expression:

           

      EvaluationError( ExecuteSQL( "SELECT __kp_CustomerID FROM CUSTOMER"; char(9); char(13)) )

           produces an 8310 error code. I don't know what that means and I've tried searching. I found out that if I remove the underscore prefix[1] from the column name, everything works as expected. Is this a bug?

           [1] double underscore in this particular test case, but even a single underscore prefix causes this problem.