Home » Developer & Programmer » Forms » How to create demo version of application using Oracle Form 6i (Windows 7, Oracle Form 6i )
How to create demo version of application using Oracle Form 6i [message #605317] Wed, 08 January 2014 12:33 Go to next message
dark_prince
Messages: 121
Registered: June 2013
Location: India
Senior Member
Hii, I have created an application using Oracle Form 6i and database Oracle 10 XE. Now I want to make this application trial or demo version like my application will only run for limited period for ex for 1 year or 6 month after that application will not start if product key is not entered to make application legal. Before the application is about to expire kinda like 1 month before it should start giving alert that "Please Register application with 16-digit product key." everyday until client register application with product key...
I hope you guys understand my post...
Can anyone tell me how to do this...

Re: How to create demo version of application using Oracle Form 6i [message #605352 is a reply to message #605317] Wed, 08 January 2014 15:36 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Put a bunch of checks and messages in WHEN-NEW-FORMS-INSTANCE trigger.
Re: How to create demo version of application using Oracle Form 6i [message #605363 is a reply to message #605352] Wed, 08 January 2014 20:42 Go to previous messageGo to next message
dark_prince
Messages: 121
Registered: June 2013
Location: India
Senior Member
Can you explain more or give me example of it
Re: How to create demo version of application using Oracle Form 6i [message #605450 is a reply to message #605363] Thu, 09 January 2014 08:34 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
I am not going to write code for you.
Use IF/THEN constructs based on conditions to allow/not allow things.
Use the built-in MESSAGE command.
Re: How to create demo version of application using Oracle Form 6i [message #605469 is a reply to message #605450] Thu, 09 January 2014 11:42 Go to previous messageGo to next message
sreekumar.nair.it
Messages: 16
Registered: January 2014
Junior Member
Hi,

I am providing you the pseudo logic/workaround to achieve the required functionality. You can modify the same with your ideas.
Please find the attached pseudo logic for your reference.

Note: Use the attached logic in WHEN-NEW-FORM-INSTANCE as a part of testing.

Please let me know if it solves the purpose.

Feel free to ask for any further technical assistance regarding the same.

Regards,
Sreee
Re: How to create demo version of application using Oracle Form 6i [message #605475 is a reply to message #605469] Thu, 09 January 2014 13:03 Go to previous messageGo to next message
dark_prince
Messages: 121
Registered: June 2013
Location: India
Senior Member
Thanks i'll the check script...
Re: How to create demo version of application using Oracle Form 6i [message #605619 is a reply to message #605475] Sun, 12 January 2014 05:44 Go to previous messageGo to next message
dark_prince
Messages: 121
Registered: June 2013
Location: India
Senior Member
Hiii sreee, I tried what you said and i just want to know whatever i did is it accurate or not so please check below code...

CREATE TABLE project_master ( project_code  NUMBER(1)
                            , user_name     VARCHAR2(10)
                            , install_date  DATE
                            , expiry_date   DATE
                            )
/
CREATE TABLE product_master ( product_code  NUMBER(1)
                            , product_key   VARCHAR2(16)
                            , CONSTRAINT product_code_pk    PRIMARY KEY (product_code)
                            , CONSTRAINT product_key_uk     UNIQUE      (product_key)
                            )
/

INSERT INTO project_master  ( project_code, user_name, install_date, expiry_date)
VALUES  (1, 'songoku', to_date(SYSDATE), add_months(TO_DATE(SYSDATE), 12))
/

INSERT INTO product_master  ( product_code, product_key)
VALUES  (1, 'RAVZWCMP4972P3EX')
/

COMMIT;


I have also uploaded the form of product_master...And here is the code which i used in WHEN-NEW-FORM-TRIGGER of my main form...

DECLARE
    key_menu	menuitem;
    v_user	PROJECT_MASTER.user_name%TYPE;
    v_install	PROJECT_MASTER.install_date%TYPE;
    v_expiry	PROJECT_MASTER.expiry_date%TYPE;
    v_days	NUMBER;
    v_left	NUMBER;
    v_check	NUMBER;
BEGIN
    SELECT	user_name, install_date, expiry_date
    INTO	v_user, v_install, v_expiry
    FROM	project_master;

    v_days	:= v_expiry - v_install;
    v_left	:= v_days - (to_date(SYSDATE) - to_date(v_install));

    IF :GLOBAL.register = 0
    THEN
        IF v_left BETWEEN 1 AND 15 
        THEN
            --FOR DENABLING REGISTER MENU IN MAIN FORM
            key_menu	:= find_menu_item ('MAIN_MENU.REGISTER');
            set_menu_item_property (key_menu, visible, property_true);
            set_alert_property ('CAUTION', title, 'Register Alert');
            set_alert_property ('CAUTION', alert_message_text, 'Software is Expiring in '||v_left||' Days. Do you want to Register It Now...?');
            v_check := show_alert ('CAUTION');
            IF v_check = alert_button1 
            THEN
                call_form (:GLOBAL.product_master); --CALLING REGISTER FORM
            END IF;
        ELSIF v_left > 15
        THEN
            --FOR DISABLING REGISTER MENU IN MAIN FORM
            key_menu	:= find_menu_item ('MAIN_MENU.REGISTER');
            set_menu_item_property (key_menu, visible, property_false);
        ELSIF v_left = 0
        THEN
            :GLOBAL.pro_exit := 0;
        END IF;
    END IF;

    IF :GLOBAL.pro_exit = 0
    THEN
        exit_form;
    END IF;
END;

Re: How to create demo version of application using Oracle Form 6i [message #605672 is a reply to message #605619] Mon, 13 January 2014 06:10 Go to previous messageGo to next message
sreekumar.nair.it
Messages: 16
Registered: January 2014
Junior Member
Hi,

The above logic looks good. The only thing which is additionally required here is a provision for the user to enter the
license key after expiry. If the product key in the product master matches with the key entered by the user then the user
should be able to open the form else don't open the form.

Regards,
Sreee
Re: How to create demo version of application using Oracle Form 6i [message #605687 is a reply to message #605672] Mon, 13 January 2014 10:45 Go to previous messageGo to next message
dark_prince
Messages: 121
Registered: June 2013
Location: India
Senior Member
sreekumar.nair.it wrote on Mon, 13 January 2014 19:10
Hi,

The only thing which is additionally required here is a provision for the user to enter the
license key after expiry. If the product key in the product master matches with the key entered by the user then the user
should be able to open the form else don't open the form.



How can I achieve this...
Re: How to create demo version of application using Oracle Form 6i [message #605695 is a reply to message #605687] Mon, 13 January 2014 12:56 Go to previous messageGo to next message
John Watson
Messages: 8930
Registered: January 2010
Location: Global Village
Senior Member
You may have a more serious problem with the Forms software. Release 6i is no longer supported so I wouldn't think that your clients can buy licences (and they certainly can't use it for free). Release 10.1.2 has indefinite sustaining support, so I suppose you might be able to persuade Larry to sell you that. But really, you should tell your clients to buy 11.1.2 which has premium support for another two or three years.
Re: How to create demo version of application using Oracle Form 6i [message #605698 is a reply to message #605695] Mon, 13 January 2014 13:26 Go to previous messageGo to next message
dark_prince
Messages: 121
Registered: June 2013
Location: India
Senior Member
Hii i think you get it all wrong...I am creating application using oracle form 6i kinda like project and in which i want to add option of registration...
Re: How to create demo version of application using Oracle Form 6i [message #605792 is a reply to message #605619] Tue, 14 January 2014 12:59 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
dark_prince wrote on Sun, 12 January 2014 06:44

v_left := v_days - (to_date(SYSDATE) - to_date(v_install));


Using TO_DATE on a date can only lead to trouble and is poor coding, let alone not using a format mask.
Re: How to create demo version of application using Oracle Form 6i [message #605806 is a reply to message #605792] Wed, 15 January 2014 00:38 Go to previous messageGo to next message
dark_prince
Messages: 121
Registered: June 2013
Location: India
Senior Member
Thanks for the advise joy...i am going to remove to_date from date column..
thanks again... Smile
Re: How to create demo version of application using Oracle Form 6i [message #605851 is a reply to message #605806] Wed, 15 January 2014 05:31 Go to previous messageGo to next message
sreekumar.nair.it
Messages: 16
Registered: January 2014
Junior Member
Hi,

You can use two different blocks. When the license expiry condition evaluates to true then call the license entry block and do the required validations after the user enters the license key. If license is valid then proceed further with form opening else be on the same block and display appropriate error message.

Regards,
Sreee
Re: How to create demo version of application using Oracle Form 6i [message #605859 is a reply to message #605851] Wed, 15 January 2014 06:51 Go to previous message
dark_prince
Messages: 121
Registered: June 2013
Location: India
Senior Member
Thanks I'll do the same...
Previous Topic: FRM-30457: Maximum Length ignored for character-datatype
Next Topic: show lov when i enter any letter or number...
Goto Forum:
  


Current Time: Wed Apr 24 00:44:22 CDT 2024