Was this helpful?
Direct Execute Immediate Statements
If II_CHARSETxx is set to UTF8, any query string in a DIRECT EXECUTE IMMEDIATE statement is sent to Enterprise Access without modification.
If the query contains non-ASCII characters, the string is sent as UTF8 encoding, which Microsoft SQL Server does not understand. Non-ASCII constants in queries will fail because Microsoft SQL Server does not support UTF8.
One potential solution is to use EXECUTE IMMEDIATE instead. In this case, the Query Layer (see Query Layer) does the necessary conversion to nvarchar for the constants and varchar host variables. If EXECUTE IMMEDIATE is inappropriate (for example, in native SQL), consider using database procedures or native SQL views.
Last modified date: 06/25/2024