Home » Developer & Programmer » Forms » call_form problem (forms 6i,oracle 9.2.0.1,win xp)
icon10.gif  call_form problem [message #334609] Thu, 17 July 2008 06:27 Go to next message
seyed456
Messages: 220
Registered: May 2008
Location: south india .
Senior Member

hello all,

another problem raised.

i have a problem with call_form ('E:\online1\qns1');

it was calling fine till yesterday but today when i was trying to call this form by using of trigger of when button pressed trigger submit button (enrollment form).the following code i written under submit button of enrollment form.


DECLARE
   v_status     CHAR (1) := 'N';
   v_courseid   NUMBER;
   a            NUMBER;
BEGIN
   IF :exam_date IS NULL
   THEN
      MESSAGE ('enter the Exam date');
   ELSIF :course IS NULL
   THEN
      MESSAGE ('select the coursename');
   ELSIF :exam_paper IS NULL
   THEN
      MESSAGE ('select the exam paper');
   END IF;

   SELECT course_id
     INTO v_courseid
     FROM online_course
    WHERE course = :block3.course 
    AND exam_paper = :block3.exam_paper;

   IF :exam_date > TRUNC (SYSDATE)
   THEN
      INSERT INTO onlin_enroll
                  (exam_id, user_name, course_id, exam_date,
                   enrollment_date, status
                  )
           VALUES (exa_id_seq.NEXTVAL, :GLOBAL.abc, v_courseid, :exam_date,
                   SYSDATE, v_status
                  );

      COMMIT;
   ELSIF :exam_date = TRUNC (SYSDATE)
   THEN
      INSERT INTO onlin_enroll
                  (exam_id, user_name, course_id, exam_date,
                   enrollment_date, status
                  )
           VALUES (exa_id_seq.NEXTVAL, :GLOBAL.abc, v_courseid, :exam_date,
                   SYSDATE, v_status
                  );

      
      CALL_FORM ('E:\online1\qns1');
      COMMIT;
   ELSIF :exam_date < TRUNC (SYSDATE)
   THEN
      a := SHOW_ALERT ('alert_exam');
  
     
   END IF;
END;




any problem with my code ? ?. ..
pls help me.
thanks in advance
Re: call_form problem [message #334613 is a reply to message #334609] Thu, 17 July 2008 06:41 Go to previous messageGo to next message
seyed456
Messages: 220
Registered: May 2008
Location: south india .
Senior Member

the error im getting is
frm-40401 no changes to save (this pop up box come front)
and automatically forms closed.

Re: call_form problem [message #334614 is a reply to message #334609] Thu, 17 July 2008 06:42 Go to previous messageGo to next message
seyed456
Messages: 220
Registered: May 2008
Location: south india .
Senior Member

i tried with :system.MEssage_level := 20;
it doesnt work.


pls helpe me to overcome this problem.
Re: call_form problem [message #334635 is a reply to message #334614] Thu, 17 July 2008 08:15 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Why the commit?
Re: call_form problem [message #334715 is a reply to message #334609] Thu, 17 July 2008 14:17 Go to previous messageGo to next message
seyed456
Messages: 220
Registered: May 2008
Location: south india .
Senior Member

thanks for the response frank,


commit for saving data.

dml manual commit .so what.

can u advice wat i do. .

pls help me.
Re: call_form problem [message #334733 is a reply to message #334715] Thu, 17 July 2008 15:34 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
But WHY do you decide that there should be committed after returning from the called form?
Suppose you're working on a Word document. You save often, but only to a single version of the file.
Now suppose you done some more editing and then you see this nice button labelled "PUSH ME". You are not really done with your editing, but hey, what the heck
It opens a nice picture and when you close the picture it saves your current version of your document.
Would you like that? NO, YOU want control over when to save things.

If you insist on committing the insert you did, try to find out what exactly "COMMIT" does in Forms. It is not what you think it is.
Re: call_form problem [message #334775 is a reply to message #334609] Fri, 18 July 2008 00:05 Go to previous messageGo to next message
seyed456
Messages: 220
Registered: May 2008
Location: south india .
Senior Member

i gone through commit in forms.

anyway what i do now to overcome this problem.
pls help me frank
Re: call_form problem [message #334794 is a reply to message #334775] Fri, 18 July 2008 00:55 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Start by explaining what exactly gets committed if you issue the "commit" in your code.
If you indeed went in-depth through the docs about using commit in Forms, you would know what you did wrong.

Show us which docs you read. Give some links

[Updated on: Fri, 18 July 2008 00:56]

Report message to a moderator

Re: call_form problem [message #334802 is a reply to message #334609] Fri, 18 July 2008 01:25 Go to previous messageGo to next message
seyed456
Messages: 220
Registered: May 2008
Location: south india .
Senior Member

that problem gone .

i eliminated one commit ,
its working fine now,

but im getting another error called frm-40815 variable global.exa doesnt exist.
im getting :global.exa from exam_id
bu using following code

select exa_id_seq.currval
into :global.exa
from dual;


from the enrollment form.
im using :global.exa in questions form .
pls help me on this.
Re: call_form problem [message #334805 is a reply to message #334802] Fri, 18 July 2008 01:31 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
How long have you had this problem before asking here?
What did you do to try to solve this yourself?

OraFAQ is NOT a debugging tool. It is NOT meant as a first resort whenever you run into a bug.
You didn't even spend 30 minutes on trying to solve this yourself.
Re: call_form problem [message #334824 is a reply to message #334609] Fri, 18 July 2008 04:23 Go to previous messageGo to next message
seyed456
Messages: 220
Registered: May 2008
Location: south india .
Senior Member

thanks frank.

i resolved the problem.your words could start motivate me.
do u know how to clear a display item ??
Re: call_form problem [message #334922 is a reply to message #334824] Fri, 18 July 2008 11:58 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Frank was successful. Now let me try: how would YOU clear an item? What steps did you do so far? Why didn't they succeed? What happened?

Hint: did you try to set its value to NULL?
Previous Topic: email through forms
Next Topic: JInitiator
Goto Forum:
  


Current Time: Mon Feb 03 07:03:03 CST 2025