Hi Ivan,
There are two reasons that may lead to this difference between Powerbuilder and PowerServer:
1) Oracle Drivers are not the same.
Powerbuilder is using the Oracle Client installed. But PowerServer is using ODP.NET. Managed Driver which is not NLS_LANG
sensitive. It is only .NET locale sensitive.
2) PowerServer has a different architecture. It doesn't connect to the Oracle database from the customer client anymore. The Oracle client user environment has changed from the client PC to the PowerServer Web API Server. It will help a lot to keep your database safe when deployed on the cloud.
If your logic depends on the result of SYS_CONTEXT ('USERENV', 'LANGUAGE'), I suggest that you work around it. Use another way to get the environment of the current user. Or execute a SQL to change the session when needed, e.g.: If you need to modify the LANGUAGE, you can execute "ALTER SESSION SET NLS_LANGUAGE=AMERICAN".
Tip: Please also notice the result of the "USER", this Oracle user may not be the same as the PowerBuilder application according to your configuration. You can learn more from DB connection differences (C/S app vs. installable cloud app) - - PowerServer 2022 Help (appeon.com)
Regards, Logan
I will look into the use og driver an our way on using language.
In my case I run booth powerbuilder and powerserver from local machin so it looks like there is differnts in the way the driver get results.
I see the same while using Toad for Oracle and Oracle developer. Toad is using client installation and Oracle developer is using odp.net. So I get the same differents there.
Than you for your reply.