943,807 Members | Top Members by Rank

Ad:
  • Oracle Discussion Thread
  • Unsolved
  • Views: 1770
  • Oracle RSS
Oct 15th, 2008
0

problem list item

Expand Post »
status

teacher build exam (question and answer) and student take the exam

form build_pre_exam add data into pre_exam table

when form run ,
user(teacher ) have to insert question and four cooses then choose from list item which one i correct answer (to enable to check exam for student) ,after that i need to insert 1 an correct answer and 0 in wrong one (these is my problem)


for example if he select choose 1 (from list item) ,insert into answer1 = 1
for example if he select choose 2 (from list item),insert into answer2 = 1

could u help me ?

attach

build_pre_exam.fmb and pre_exam table

Thanks
Attached Files
File Type: zip BUILD_PRE_EXAM.zip (11.7 KB, 16 views)
File Type: zip PRE EXAM.zip (333 Bytes, 14 views)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Mohandsa is offline Offline
11 posts
since Oct 2006
Dec 10th, 2008
0

Re: problem list item

you need to handled this in "WHEN-LIST-CHANGED"
EX:
table name A,field name :question
question: what is the result of 10+5?
1)25
2)35
3)15
4)45
you know that which is the answer for that question,right?
here answer is 3
So, you need to write code like
declare
var1 number;--(to store ques no)
var2 number;--(to store ans no)
var3 number;--(to store updated ans result)
cursor c1 is
select ques_no,ans from A
where ques_no = :A.ques_no;
begin
open c1;
fetch c1 into var1,var2;
close c1;

IF :A.ques_no = var1 then
if :A.ans = var2 then
var3:=1;
-- you just assign 0's to remaining options
end if;
end if;
--after this you just update the table with thease values or you can insert these into required fields.............

I hope this can help you to handle your requirement.......Otherwise
you can get some ideas by seeing this as per your requirement.....
If you get the solution by someother way means plesase send the solution for reference purpose....
Reputation Points: 10
Solved Threads: 0
Newbie Poster
like_to_learn is offline Offline
9 posts
since Dec 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Oracle Forum Timeline: How to make query to retrieve first,last,next,Preivius data from databse
Next Thread in Oracle Forum Timeline: I need the logic behind date syntax





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC