Solved

Using a timer with GET_APPLICATION_PROPERTY

Posted on 2001-08-22
2
1,386 Views
Last Modified: 2012-06-22
I'm using a timer (incorrectly), and in the WHEN-TIMER-EXPIRED trigger, I am getting this error:

"ORA-06502: PL/SQL: numeric or value error
Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2). "

I suspect I'm doing something wrong when I supply the name of the timer to GET_APPLICATION_PROPERTY.

The code to where I create the timer and also the WHEN-TIMER-EXPIRED code (where I suspect the trouble is) is directly below.

Thanks in advance.
-Brian

----------------------------------------
In my WHEN-NEW-FORM-INSTANCE trigger, I initialize a timer like this:

   TimerID := find_timer ('EDITTIMER');
   if not id_null (TimerID) then
      delete_timer (TimerID);
   end if;
   TimerID := create_timer ('EDITTIMER', 1000, REPEAT);
----------------------------------------
Then in my WHEN-TIMER-EXPIRED, I want to have some code execute when this timer fires, but I receive

declare
   CurTimer VARCHAR2(40) := Get_Application_Property ('EDITTIMER');
   x number;
begin
   if CurTimer = 'EDITTIMER' then
      x := show_alert ('test');
   end if;
end;
0
Comment
Question by:bek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
UsamaMunir earned 50 total points
ID: 6414845
Oh Mistake Mistake!

you will write it like this

CurTimer VARCHAR2(40) := Get_Application_Property (timer_name);

timer_name is a reserved word, u cant specify the exact name of the timer, this built-in will automaticaly give u the name of the MOST RECENTLY timer expired.



Cheerz
U
0
 

Author Comment

by:bek
ID: 6414868
Ah, I see you're right.  I misread the documentation. :(

Thank you very much for the help!

-Brian
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question