call_form problem [message #334609] |
Thu, 17 July 2008 06:27 |
|
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 #334733 is a reply to message #334715] |
Thu, 17 July 2008 15:34 |
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 #334794 is a reply to message #334775] |
Fri, 18 July 2008 00:55 |
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 |
|
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 |
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 #334922 is a reply to message #334824] |
Fri, 18 July 2008 11:58 |
|
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?
|
|
|