Software lock [message #548749] |
Sun, 25 March 2012 20:57 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
shahzad-ul-hasan
Messages: 643 Registered: August 2002
|
Senior Member |
|
|
Dear
i want to lock my software after one week time.i want to make it trial.i have written the following code in when_new_form_instance.
................................................
Begin
If :SYSTEM.CURRENT_DATETIME>='02-04-2012' THEN
Set_Menu_Item_Property(m,ENABLED,PROPERTY_FALSE);
MESSAGE('YOUR TRIAL PERIOD IS OVER. PLEASE CONTACT US...');
MESSAGE('YOUR TRIAL PERIOD IS OVER. PLEASE CONTACT US...');
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
------------------------------------------------------------
First Error:
Cannot find the menu item. invalid id.
Software open. no locking is occure.
Second Error.
if the date is 30-Mar, 2012. it will also gives me message of your trial period is over.After that software is also opened.
....................................................
please help me to correct this solutions.
|
|
|
|
|
|
Re: Software lock [message #548839 is a reply to message #548829] |
Mon, 26 March 2012 10:45 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
owais_baba
Messages: 289 Registered: March 2008 Location: MUSCAT
|
Senior Member |
|
|
Dear its very very very easy just copy this and paste this code in when-new-form-instance
declare
cur_date date default sysdate;
begin_date date default '12-apr-2012';
dif number(2);
begin
dif := cur_date - begin_date;
if dif < 5 then
set_WINDOW_property(FORMS_MDI_WINDOW,WINDOW_STATE,MAXIMIZE);
set_window_property('WINDOW1',WINDOW_STATE,MAXIMIZE);
else
EXIT_FORM;
message('YOUR TRIAL PERIOD IS OVER. PLEASE CONTACT US...');
message('YOUR TRIAL PERIOD IS OVER. PLEASE CONTACT US...');
end if;
end;
OR if u wanted to removed complete folder then use this
host ('deltree/y e:\saved');--- instead of "EXIT_FORM"
Hope your problem solved
[Updated on: Mon, 26 March 2012 10:51] Report message to a moderator
|
|
|
|
|
|
|
Re: Software lock [message #613750 is a reply to message #549333] |
Sat, 10 May 2014 04:45 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
riffatchishti
Messages: 3 Registered: January 2010 Location: Multan, Pakistan
|
Junior Member |
|
|
just restrict on purchase invoice no, Sales invoice no or series of Vouchers on any other item which is being updated daily. just restrict them to 50,60 invoices. when record got its limits then show the message for "Trial Ended"......
|
|
|