I encountered a problem using the OCIDLL variable with Oracle instant clients.
Some special characters were converted to ? Appears to be characters above asci 128.

Simple test case:

SQL: select ' SEI’s (“SEI”) ' spclchar from dual

Result: SEI?s (?SEI?)

Delphi 11.3
DOA 4.14
Oracle DB 19.19
Oracle Instant Client 19.3 64 bit. I tried Instant client 21.3. Same result.

The variable method returns the correct results when using a full oracle client install. The OracleHomeName is auto populated in this case.

Am I missing another setting using the OCIDLL method?
Can you check the NLS_LANG environment variable? Can you set it to the same value as the NLS_LANG key of the full Oracle Client? For the full Oracle Client you can find it in the registry at HKEY_LOCAL_MACHINE\Software\Oracle\Key_<HomeName>\NLS_LANG.
The NLS_LANG variable is empty and cannot be assigned in the delphi code. I tried setting a NLS_LANG environment variable to the same value as found in the registry key for the full client. NLS_LANG variable was still blank.

The goal is to fully setup the OCI information in the delphi code without any environment or registry settings to make deployment easy.
You can set the NLS_LANG environment variable in your code, before the first connection is made to the database. Note that the variable value is local to your application and subprocesses. It will not affect the NLS_LANG value in Windows or in parent processes.
Thank you Marco. I am puzzled as to why my initial test with setting NLS_LANG env didn't seem to work.
© Allround Automations forums