V
vadapallyraju
Hi Friends,
I am relatively new to this generation of variables in ASP. I am unable
to proceed from here. Can somebody advise ?
Challenge :
I get number of participants in an exam, from a sql statement and
stored into a variable called headcount.
After that, I am using the following to initialize randomly generated
variables. For example if there are 4 students in the class, I intend
to get student1, student2, student3 and student4, all of them
initialized to 0.
For j=1 To CLng(headcount)
Eval Execute("student" & j & "=" & 0)
Next
Now we are trying to find out question wise defaults in the test. I
have a for loop that does traverse through all the questions in the
test. As I go question by question, if there is any failure I would
like to increment the errorcounter of that participant.
Which means
Q1. student1= 0, student2= 0, student3= 0, student4= 0 if all the
answers are fine.
Q2. student1= 0, student2= 0, student3= 0, student4= 0 if all the
answers are fine.
and so on.
<% do while not rs4.eof %>
<%
ctr = ctr + 1
if rs3("actualscore") = rs4("individualscore") then
Eval Execute("student" & "ctr" & " = " & "student" & "ctr" + 1)
end if
rs4.movenext
loop
ctr = 0
%>
My question is as ctr increases in the for loop, i want to append it to
student and take some values into it. i.e. student1=0, student2=1 etc.
So i am using this Eval Execute("student" & "ctr" & " = " & "student"
& "ctr" + 1).
Can someone help me please ???
Kind Regards,
raj.
I am relatively new to this generation of variables in ASP. I am unable
to proceed from here. Can somebody advise ?
Challenge :
I get number of participants in an exam, from a sql statement and
stored into a variable called headcount.
After that, I am using the following to initialize randomly generated
variables. For example if there are 4 students in the class, I intend
to get student1, student2, student3 and student4, all of them
initialized to 0.
For j=1 To CLng(headcount)
Eval Execute("student" & j & "=" & 0)
Next
Now we are trying to find out question wise defaults in the test. I
have a for loop that does traverse through all the questions in the
test. As I go question by question, if there is any failure I would
like to increment the errorcounter of that participant.
Which means
Q1. student1= 0, student2= 0, student3= 0, student4= 0 if all the
answers are fine.
Q2. student1= 0, student2= 0, student3= 0, student4= 0 if all the
answers are fine.
and so on.
<% do while not rs4.eof %>
<%
ctr = ctr + 1
if rs3("actualscore") = rs4("individualscore") then
Eval Execute("student" & "ctr" & " = " & "student" & "ctr" + 1)
end if
rs4.movenext
loop
ctr = 0
%>
My question is as ctr increases in the for loop, i want to append it to
student and take some values into it. i.e. student1=0, student2=1 etc.
So i am using this Eval Execute("student" & "ctr" & " = " & "student"
& "ctr" + 1).
Can someone help me please ???
Kind Regards,
raj.