Home » Developer & Programmer » Forms » Trigger Fired at particular Date ? (10g,Developer 6i, Window Xp)
Trigger Fired at particular Date ? [message #379174] Mon, 05 January 2009 04:15 Go to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Hellow

I want to know if there is any possibility that when system date = '25-jan-09' trigger fired and message come "25 January 2009"

Its because i need reminder system in my module


Thanks


Shahzaib Ismail
Re: Trigger Fired at particular Date ? [message #379244 is a reply to message #379174] Mon, 05 January 2009 12:01 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
"Timer" might be one topic to research.

Although, if you want to do it once in a form (i.e. your users don't work overnight shifts so noone is there at midnight so that he/she needs to be warned about change of a date), this piece of code could be put into the WHEN-NEW-FORM-INSTANCE trigger:
IF TRUNC(SYSDATE) = TO_DATE('25.01.2009', 'dd.mm.yyyy') THEN
   MESSAGE('It is 25.01.2009!');
END IF;
Re: Trigger Fired at particular Date ? [message #379335 is a reply to message #379174] Tue, 06 January 2009 02:13 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
well in this case
if any one change the system date

for example if today is 07-Jan-09 i change my system date with 25-Jan-09 in this case the trigger fire today

so i need the trigger will fired actual 25-Jan-09


any idea


Thanks

Shahzaib Ismail
Re: Trigger Fired at particular Date ? [message #379345 is a reply to message #379335] Tue, 06 January 2009 02:38 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
So, did you research use of a timer?
icon1.gif  Re: Trigger Fired at particular Date ? [message #379434 is a reply to message #379174] Tue, 06 January 2009 07:55 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Do you have any good link which teach me about timer or do you have any fmb file



Thanks


Shahzaib
Re: Trigger Fired at particular Date ? [message #379468 is a reply to message #379434] Tue, 06 January 2009 12:29 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
Do you have any good link
Not unless I Google for it (which you may do by yourself) or open Forms Online Help System and read about it there (which you can also do by yourself).
Re: Trigger Fired at particular Date ? [message #380574 is a reply to message #379345] Mon, 12 January 2009 06:31 Go to previous messageGo to next message
tipyyt
Messages: 11
Registered: March 2007
Location: Karachi
Junior Member

IF TRUNC(SYSDATE) = TO_DATE('25.01.2009', 'dd.mm.yyyy') THEN
   MESSAGE('It is 25.01.2009!');
END IF;



Work fine because sysdate gets server date not client date,

Re: Trigger Fired at particular Date ? [message #380575 is a reply to message #379174] Mon, 12 January 2009 06:33 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
i know it but if i change system date today as 25-jan-09 the trigger will fire today i want trigger will fire actual 25-jan-09


Thanks
Re: Trigger Fired at particular Date ? [message #380580 is a reply to message #380575] Mon, 12 January 2009 07:15 Go to previous messageGo to next message
javed.khan
Messages: 340
Registered: November 2006
Location: Banglore
Senior Member

But What the point is to Change your System Date today by your own? Nobody gonna change the Sysdate of your system or server untill unless its not placed publicaly.Why dont you give it a Try later you can find and sue the person whoever change your System Dates.
Javed
Re: Trigger Fired at particular Date ? [message #380581 is a reply to message #379174] Mon, 12 January 2009 07:16 Go to previous messageGo to next message
cookiemonster
Messages: 12422
Registered: September 2008
Location: Rainy Manchester
Senior Member
Then don't change the system date?
Because if someone does that you're going to have far bigger problems than when your message is displayed.
Re: Trigger Fired at particular Date ? [message #380583 is a reply to message #380581] Mon, 12 January 2009 07:23 Go to previous messageGo to next message
javed.khan
Messages: 340
Registered: November 2006
Location: Banglore
Senior Member

This is like not pulling your Car on Road because of the Signals are RED. Pull out your Car Man...

[Updated on: Mon, 12 January 2009 07:24]

Report message to a moderator

Re: Trigger Fired at particular Date ? [message #380592 is a reply to message #379174] Mon, 12 January 2009 08:02 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
@ Above

Thanks for reply

Basically the Reason behind this is that when i give my module to any one he will know at particular date to his pending works or what ever i need to write in trigger

For Example when 15-jan-09 Arrive The message of "Submission of Sales tax Return"

But some one else or any one change the date of system then the message will come before the particular date

So i need when actually 15-jan-08 come the massage automatically Display at 15-jan-08

Hope you guys Understand my problem


Thanks


Shahzaib
Re: Trigger Fired at particular Date ? [message #380675 is a reply to message #380592] Mon, 12 January 2009 23:50 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I suggest supplying a cricket (baseball) bat to your client and instruct them to use it around the back of the head of the person who is changing the system date of their PRODUCTION computing machine.

It is not worth the effort to try and write this type of stuff unless you intend accessing a web-service and reset the date/time yourself. Google 'atomic time date update' and get a date time updater and install it on your client's machine.

David
Re: Trigger Fired at particular Date ? [message #380687 is a reply to message #380675] Tue, 13 January 2009 00:35 Go to previous messageGo to next message
javed.khan
Messages: 340
Registered: November 2006
Location: Banglore
Senior Member

Ask your administration to disable the Date Time Update Right on the Machine and if you cant Better Supply the BaseBall Bat Smile
Re: Trigger Fired at particular Date ? [message #380690 is a reply to message #379174] Tue, 13 January 2009 00:49 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
its a good idea Javaid

I already used it

But i thing might be there is any other way ?


Keep searching


Thanks

Shahzaib
Re: Trigger Fired at particular Date ? [message #380699 is a reply to message #380690] Tue, 13 January 2009 01:07 Go to previous message
javed.khan
Messages: 340
Registered: November 2006
Location: Banglore
Senior Member

Yes you can use more deadly wepons then a DJ's Baseball bat isnt it?


Smile
Previous Topic: get developer suite's working directory
Next Topic: when mouse Double click
Goto Forum:
  


Current Time: Sat Dec 10 16:36:53 CST 2016

Total time taken to generate the page: 0.09129 seconds