i have 2 table's...
table 1-Name,adresss,full mark,class id
table 2-Name,subjek,mark1,mark2,total
now i have to calculate the total marks for the student...for all subject tat the student takes...
my coding goes like this:
<% strsql="Select class id from table 1 where Name=request.form("txtname");"
strsql1="Select total from table 2 where Name=request.form("txtname");"
set ss=cnn.execute(strsql)
set ss1=cnn.execute(strsql1)
%>
<%
dim totalmark
totalmark=0
while not ss.eof %>
<% if ss.fields(class id)<>"" then
while not ss1.eof
totalmark=totalmark+ss1.fields(total)
wend
strsql2="update table1 SET full mark='"&totalmark&"' WHERE Name=request.form("txtname")
%>
..the problem is this coding doesnt work...where am i wrong?...