Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2004
    Posts
    2

    Question Unanswered: How 2 call Another forms Procedure in Oracle Dev 6i

    Hi Guys n Girls,
    Its me KHAS Working as Software Engg Im facing a problem that How can I call a procedure from another form for example:
    A form named "C:\MY_FORMS\TEST1.FMB" it has a procedure named "TESTING1". I want to call this procedure in other form at runtime.

    Can anyone help me regarding this problem...

    thanx

    Best Regards,

    KHAS FRIEND

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    If I understood well: you have two forms:
    - TEST1.FMB which contains a procedure named TESTING1
    - TEST2.FMB
    You'd like to call TESTING1 from TEST2.FMB, right? I'm afraid you can't do that. You can call a form, but not a procedure within. However, you could make TESTING1 to be a stored procedure and then call it from both TEST1.FMB and TEST2.FMB.

  3. #3
    Join Date
    Nov 2004
    Posts
    2
    Dear Little Foot (Lost Boy)
    I want to call procedure of regarding purely of Forms Like:

    Begin
    If :TXT1 = :TXT2 then
    :TXT3 := 'These are equal';
    End If;
    End;

    Can this procedure be saved in Database like u r talking about "Stored Procedure".
    I think this example may help u to understand my problem. If u still did not get my point than Ill send u the forms and table structure that may help u.

    Anyways thanx 4 replying me and yes may i have ur email id so i can mail u the source.

    KHAS FRIEND

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    For the example you provided, stored procedure could be something like this:
    Code:
    CREATE OR REPLACE FUNCTION fun_equality (
       par_txt1   IN   VARCHAR2,
       par_txt2   IN   VARCHAR2
    )
       RETURN BOOLEAN
    IS
    BEGIN
       RETURN (par_txt1 = par_txt2);
    END;
    /
    Now you can use this procedure in any of your forms using such a code:
    Code:
    IF fun_equality(:txt1, :txt2) THEN
       :txt3 := 'They are equal';
    ELSE
       :txt3 := 'They are different';
    END IF;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •