1. Ivan Aase
  2. PowerServer
  3. Thursday, 9 March 2023 16:13 PM UTC

Hi,

Anybody that could tell me why there is one different on Language selection when using Powerserver regards to powerbuilder on same database and same connection rules. The same different is one using sql developer vs Toad for Oracle

Could this have to do with the language on registry, or ?

The sql using is :  select SYS_CONTEXT ('USERENV', 'LANGUAGE'), USER from DUAL;

In powerserver and sql developer it gives me  : NORWEGIAN_NORWAY.WE8MSWIN1252, SUPPORT

while in Powerbuilder and Toad for Oralce it is : AMERICAN_AMERICA.WE8MSWIN1252, SUPPORT

Has anyone has this kind og issue ?

Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Friday, 10 March 2023 07:30 AM UTC
  2. PowerServer
  3. # 1

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

Comment
  1. Ivan Aase
  2. Friday, 10 March 2023 07:41 AM UTC
Thank you,



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.

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.