| | |
problem list item
Please support our Oracle advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2006
Posts: 11
Reputation:
Solved Threads: 0
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
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
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....
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....
![]() |
Similar Threads
- Sorted linked list help (C++)
- Problem with lists in advanced reply (DaniWeb Community Feedback)
- problem with java.util.Collections (Java)
- Problem receiving result from Microsoft Soap toolkit server service using Nusoap clie (RSS, Web Services and SOAP)
- Passing a drop down list item's value (HTML and CSS)
- Weird (?) problem using std::list ... (C++)
- Problem While Processing A String List (C++)
- List View Sorting and Callback (C)
Other Threads in the Oracle Forum
- Previous Thread: How to make query to retrieve first,last,next,Preivius data from databse
- Next Thread: I need the logic behind date syntax
| Thread Tools | Search this Thread |
2009predictions acquisition amazon.com bartz bernanke cia citrix cloudcomputing crm database dell economy editor enterprise enterprise2.0 enterprisesoftware federalreserve forbes hp ibm intellipedia internet larryellison layoffs linux loughridge mediawiki michaeljackson microsoft neverland nortel notebooks oil operatingsystem oracle palm rimm saas salesforce sap seagate socialcomputing sql sun sybase technologystocks virtualiron virtualization vmware wiki wikipedia xen yahoo zoho





