Home » Developer & Programmer » Forms » Using Citrix to access Oracle Forms
Using Citrix to access Oracle Forms [message #202921] Mon, 13 November 2006 05:11 Go to next message
Brennz
Messages: 2
Registered: November 2006
Junior Member
Hello All,

I have a problem when accessing the Oracle Forms through citrix. When using a local computer in the network it works fine, but when logging in remotely through Citrix I get this error:

FRM-40735 PRE-FORM trigger raised unhandled exception ORA-304500

Now normally this can be triggered by a programming error, but it works fine normally, just not through Citrix. Does this mean that some extra coding has to be done to accomodate citrix? The Oracle DB is mapped through the network to the Citrix Server. There is only 1 user that logs in and uses Oracle6i through Citrix. Any help would be greatly appreciated.
Re: Using Citrix to access Oracle Forms [message #203083 is a reply to message #202921] Mon, 13 November 2006 16:53 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I suggest you need to do some more testing of your Citrix environment. Please post the code that you have in the 'Pre-Form' trigger. I think that you are conditionally testing an environment variable when it is Citrix and it does not exist at this level of the Form. There any many things that will not work in Pre-Form that will work quite happily in When-New-Form-Instance.

David
Re: Using Citrix to access Oracle Forms [message #203167 is a reply to message #203083] Tue, 14 November 2006 03:14 Go to previous messageGo to next message
Brennz
Messages: 2
Registered: November 2006
Junior Member
Here is the code that is in the PRE-FORM. One of the System anaylists has informed me that it worked with version 9, but not with 9i. This code has not been updated at all since release 9. Maybe I will contact Citrix as to what I need to update in the code.






DECLARE
tt VARCHAR2(200);
active_win PLS_INTEGER;
v_timebase p5_timebase.wert%TYPE;
v_waehrung p5_timebase.waehrung%TYPE;
vType p5_orionuser.inst_type%TYPE;
vProdVersion VARCHAR2(40);
VersionFalsch EXCEPTION;
vHelpPath VARCHAR2(200);
nCheckPath NUMBER;
mail_account_exists NUMBER;
new_exists NUMBER;
con_str VARCHAR2(200);
BEGIN
active_win:=Win_Api_Utility.Get_Active_Window;
Win_Api_Session.Change_MDI_Icon(active_win, 'Logo1.ico',0);

select env,usr_typ into :GLOBAL.umgebung,:GLOBAL.user_typ from p5_orionuser where upper(usr)=USER;
select orenv,env_langtext into
:GLOBAL.proomm_env,:GLOBAL.env_langtext from p5_orionuser where upper(env)=upper(:GLOBAL.umgebung) and upper(env)=upper(usr);

--Überprüfen der P5-Produktversion
BEGIN
vType:=p5gl_check_inst_type;
EXCEPTION
WHEN others THEN
vType:='CL';
END;
IF vType='NT' THEN
vProdVersion:='new technologies ';
ELSIF vType='CL' THEN
vProdVersion:='classic ';
END IF;
-- get database name
con_str := GET_APPLICATION_PROPERTY(CONNECT_STRING);
IF con_str IS NULL THEN
con_str :=
WIN_API_ENVIRONMENT.GET_ENVIRONMENT_STRING('local',
FALSE);
END IF;

Set_Window_Property(FORMS_MDI_WINDOW, TITLE, 'ORion-PI
P5
'||vProdVersion||nvl(:GLOBAL.env_langtext,:GLOBAL.UMGEBUNG));
IF :GLOBAL.proomm_env is not null THEN
p5_grant_proomm_user_access(:GLOBAL.proomm_env);
END IF;
Set_Window_Property('P5', TITLE, 'ORion-PI (C)1992-2006 Axxom AG, Munich [Environment: '||upper(:GLOBAL.umgebung)||' User:
'||USER||' Linked PROOMM Env.: '||:GLOBAL.proomm_env||'
Database: '||con_str||']');
-- timebase auslesen, wird in einigen Masken beim When-Window- Activated Trigger gesetzt
BEGIN
select wert into v_timebase from p5_timebase where rownum=1;
IF v_timebase=1 THEN
p5_no_msg(9575, tt);
ELSIF v_timebase=2 THEN
p5_no_msg(9576, tt);
ELSIF v_timebase=3 THEN
p5_no_msg(9577, tt);
ELSIF v_timebase=4 THEN
p5_no_msg(9578, tt);
END IF;
:GLOBAL.ZEITBASIS:=tt;
EXCEPTION
WHEN no_data_found THEN
p5_no_msg(9577, tt);
:GLOBAL.ZEITBASIS:=tt;
END;

-- Waehrung auslesen, wird in einigen Masken beim When-Window- Activated Trigger gesetzt
BEGIN
select waehrung into :GLOBAL.WAEHRUNGSBASIS from p5_timebase where rownum=1;
IF :GLOBAL.WAEHRUNGSBASIS IS NULL THEN
:GLOBAL.WAEHRUNGSBASIS:='¤';
END IF;
EXCEPTION
WHEN no_data_found THEN
:GLOBAL.WAEHRUNGSBASIS:='¤';
END;

-- in fast allen Masken genutzte Strings werden hier einmal zentral geladen
p5_no_msg(7990, tt); :GLOBAL.DMC_KGC := tt;
p5_no_msg(7995, tt); :GLOBAL.CONSULTING := tt;
p5_no_msg(5815, tt); :GLOBAL.LOESCHEN := tt;
p5_no_msg(5820, tt); :GLOBAL.KOPIEREN := tt;
p5_no_msg(5015, tt); :GLOBAL.CHANGE := tt;
p5_no_msg(50000, tt); :GLOBAL.DEF_FORMAT_MASK := tt;
p5_no_msg(50005, tt); :GLOBAL.FOUR_DIGIT_FORMAT_MASK := tt;
p5_no_msg(50010, tt); :GLOBAL.EXT_FORMAT_MASK := tt;

--Globale Variable zur Unterscheidung der MDI/SDI Anwendung
:GLOBAL.APP_IS_MDI:='TRUE';

--für Fernwartungsarbeiten wird das Hintergrundbild disabled
--IF upper(:PARAMETER.SHOWPIC)='NO' THEN
IF upper(:global.showpic)='NO' THEN
set_window_property('P5', HEIGHT, 0);
END IF;

--die Tabelle für returncodes wird beim Start von Orion aufgeräumt
BEGIN
p5_clear_app_retcodes_table;
EXCEPTION
WHEN others THEN NULL;
END;

--das Workdirektory wird geladen und in eine Globale Variable übergeben
BEGIN
:GLOBAL.WORKING_DIR:=orion_winapi.GetDirectory;
vHelpPath:=:GLOBAL.WORKING_DIR||'\..\HELP\Deutsch\p5';
nCheckPath:=check_path(vHelpPath, 'helpframe.htm', 'pathtest.txt');
IF nCheckPath = 0 THEN
--kein Kundenpfad gefunden
vHelpPath:=:GLOBAL.WORKING_DIR||'\..\HELP\Englisch\p5';
END IF;
:GLOBAL.BROWSER_PATH:=orion_winapi.FindExecutable
('helpframe.htm', vHelpPath);
EXCEPTION
WHEN others THEN
bell;
clear_message;
message('ORA-22000: No access on Windows32 dll', NO_ACKNOWLEDGE);
END;





---##### new for AlertMonitor #######
BEGIN
-- execute function to check if the user has an account for mail
mail_account_exists := P5GL_MAIL_ACCOUNT_EXISTS;
IF mail_account_exists = 1 THEN -- 1 means mail acount exists, 0 means not exists
-- execute function to check if there are some new mails
new_exists := new_mail_exists(USER);
-- global.mail_account is necessary for when-window-activated trigger
:GLOBAL.MAIL_ACCOUNT := 'Y';
-- global.alert_time is necessary for p5lib.pll
:GLOBAL.ALERT_TIME := to_char(SYSDATE, 'DD.MM.YY:HH24-MI-SS');
IF new_exists = 1 THEN -- 1 means new mail exists, 0 means not exists
-- message 'strat Alert-Message'
CLEAR_MESSAGE;

Message(p5_get_msg(8000),NO_ACKNOWLEDGE);
/* Aufrufen des Alert_monitor */
-- if you change this code, please change also
-- p5.mmb tools_menu alert, and p5lib.pll
set_form_pre_form
DECLARE
tt
VARCHAR2(2000);
v_mode VARCHAR2(5);
v_lang NUMBER;
BEGIN
SELECT
NVL(MAX(language), 2) INTO v_lang FROM P5_USER_LANGUAGE WHERE USR = USER;
IF v_lang != 1 THEN
v_lang := 2;
END IF;
---open alert monitor
host('winstart AlertMonitor '||
USER||' '||

Get_Application_Property(PASSWORD)||
' '||USER||' '||'P5'||' '||v_lang, NO_SCREEN);
---
IF NOT Form_Success THEN
CLEAR_MESSAGE;

Message(p5_get_msg(86),NO_ACKNOWLEDGE);
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE;
WHEN OTHERS THEN
RAISE;
END;
/* Ende Aufrufen des Alert_monitor */
END IF;
ELSE -- mail_account_exists = 0, it means no mail account
:GLOBAL.MAIL_ACCOUNT := 'N';
END IF;
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
--###################
-- set the window size normal
SET_window_property('P5', window_state, normal);

EXCEPTION
WHEN others THEN
raise;
END;

Re: Using Citrix to access Oracle Forms [message #203346 is a reply to message #203167] Tue, 14 November 2006 19:28 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Thank you for posting all that stuff. Now press the 'edit' button on that 'post' and place 'code' tags around each of the separate lumps of trigger code. It would also help if you detailed from which trigger each of the code lumps came and do a quick translation of the German(?) into English.

David

[Updated on: Wed, 15 November 2006 19:43]

Report message to a moderator

Re: Using Citrix to access Oracle Forms [message #203468 is a reply to message #203167] Wed, 15 November 2006 04:05 Go to previous message
pchircop
Messages: 4
Registered: November 2006
Junior Member
I use Citrix and Forms 6 for many years (300 users)
I works quite alright in both mode (C/S and citrix).
No need for any changes.
Your error seems to be an error produced by the win_api package.
Make sure then oracle dll "D2kwuti60.dll" is in your form path (on citrix server) because it's not installed by default.
Check the d2kwutil package to find where to put your dll.
In your exception handler, you can display the error from the package (win_api.error_stack)
Previous Topic: Executing Multiple Triggers on Button Click
Next Topic: Standard Menu Button Problem
Goto Forum:
  


Current Time: Tue Dec 06 08:25:47 CST 2016

Total time taken to generate the page: 0.06451 seconds