USER vs APP_USER
827060Dec 28 2010 — edited Dec 28 2010Hi All,
I have an existing application (database accessed through Oracle/Forms) and I want to make an extra access possibility through Apex.
The problem I am having is a different value of the oracle variable "USER" when I access the database through Forms or through Apex.
Example:
I logon (Forms and Apex) with username = username_1
I access a view named view_name_1 like : SELECT * FROM view_name_1;
The view-definition is : SELECT * FROM table_name_1 WHERE tab_col_name_1 = USER;
Now when I access the database through Oracle/Forms this view returns me the correct rows because it filters on USER=username_1
But when I access the database through Apex this view returns no rows because it filters on USER=APEX_PUBLIC_USER
I know I can solve this problem by changing all my database code (views,functions,packages,....) where the variable USER is used by NVL(v('APP_USER'),USER)
But this is a bad solution in my opinion because I need to change an existing good working system just because I want to access it through Apex and with this the danger to get new bugs when changing the programs.
Now for my question : Is there no option or switch that can be set so that the value of the database variable "USER" stays unaltered!
Thanks already for your time!
GR.
Axxi
Edited by: user13558062 on Dec 28, 2010 3:49 PM