Home » Developer & Programmer » Forms » HELP !!!! : How Set v$session.module in Oracle Forms
icon3.gif  HELP !!!! : How Set v$session.module in Oracle Forms [message #181079] Thu, 06 July 2006 11:51 Go to next message
henryhrcr
Messages: 6
Registered: July 2006
Junior Member
Hello.

I need to set v$session.module or v$session.program in oracle forms, but i net to set before the post-logon trigger in database was executed.

I really need identify my application, and in the post-logon trigger verify if the application is my application.

Generaly, a forms application not set the v$sesssion.module or v$session.program. They are Null. So, I need set but before the post-logon trigger in database is executed, because i need to do some validations if the application is running is 'My-Application'.

Thanks for your help.

Re: HELP !!!! : How Set v$session.module in Oracle Forms [message #181140 is a reply to message #181079] Fri, 07 July 2006 01:02 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I do not understand the problem that you are trying to solve. Where is this code that you are running? If it is in your form then you are in your form. If you are not in your form then your form code will not be running.

David
Re: HELP !!!! : How Set v$session.module in Oracle Forms [message #181235 is a reply to message #181140] Fri, 07 July 2006 10:46 Go to previous messageGo to next message
henryhrcr
Messages: 6
Registered: July 2006
Junior Member
Thanks David.

Let me explain you.

I need identify my application, so i use dbms_application_info.set_module in the POST-LOGON of the principal form of my application, i use :

dbms_application_info.set_module('MY-APPLICATION',NULL);

this sentence let me identify my application, so if i query the v$session.module in sql, i can see 'MY-APPLICATION' in v$session. This work good !!!

But the problem is, i need to do some restrictions in the POST-LOGON trigger in DATABASE, but this trigger in database start before the post-logon trigger in the form. So when i going to verify in the post-logon in database, the v$session.module is not set yet. This is in blanks or null.

This is the code example :

IN THE FORM
IN POST-LOGON TRIGGER
Dbms_Application_Info.Set_Module('MY-APPLICATION',Null);

IN DATABASE LEVEL

CREATE OR REPLACE TRIGGER Check_Restrictions
After Logon ON DATABASE

declare
vc_module varchar2(200);

begin
select S.module
into vc_Module
from v$session S
where audsid = USERENV('sessionid');

if vc_Module <> 'MY-APPLICATION' then
-- Fire the restrictions
end if;
end;

The problem is, when my application starts, the after logon trigger in database starts before POST-LOGON trigger in the forms, so the v$session.module is not set yet, so i can not do the restrictions.

I Apreciate your help.

Thanks !!!
Re: HELP !!!! : How Set v$session.module in Oracle Forms [message #181237 is a reply to message #181079] Fri, 07 July 2006 10:50 Go to previous messageGo to next message
henryhrcr
Messages: 6
Registered: July 2006
Junior Member
Thanks David.

Let me explain you.

I need identify my application, so i use dbms_application_info.set_module in the POST-LOGON of the principal form of my application, i use :

dbms_application_info.set_module('MY-APPLICATION',NULL);

this sentence let me identify my application, so if i query the v$session.module in sql, i can see 'MY-APPLICATION' in v$session. This work good !!!

But the problem is, i need to do some restrictions in the POST-LOGON trigger in DATABASE, but this trigger in database start before the post-logon trigger in the form. So when i going to verify in the post-logon in database, the v$session.module is not set yet. This is in blanks or null.

This is the code example :

IN THE FORM
IN POST-LOGON TRIGGER
Dbms_Application_Info.Set_Module('MY-APPLICATION',Null);

IN DATABASE LEVEL

CREATE OR REPLACE TRIGGER Check_Restrictions
After Logon ON DATABASE

declare
vc_module varchar2(200);

begin
select S.module
into vc_Module
from v$session S
where audsid = USERENV('sessionid');

if vc_Module <> 'MY-APPLICATION' then
-- Fire the restrictions
end if;
end;

The problem is, when my application starts, the after logon trigger in database starts before POST-LOGON trigger in the forms, so the v$session.module is not set yet, so i can not do the restrictions.

I Apreciate your help.

Thanks !!!
Re: HELP !!!! : How Set v$session.module in Oracle Forms [message #182356 is a reply to message #181237] Fri, 14 July 2006 07:58 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Can you set it in the Pre-Logon trigger?

David
Previous Topic: how Handel the lov
Next Topic: moving a frame
Goto Forum:
  


Current Time: Fri Sep 20 12:31:08 CDT 2024