Error message exeption occured
this is a snippet of my code the section i am interested in is highlighted.
This loop returs an error ... what i need to do is the following
i have a list of recods with various critaria names
and their respective status for this record
now i want to report on it
selecting the fields of the database, looping through the Critname and as long as the critName does not change count up a counter.then display the counter result and the last critName - go to the next record and check it against the value stored under strTest.
The second loop throws me that frigging error ... and frustrates me bejond believe... Where do I go wrong in the logic??
Please help
sqlStrDef = "SELECT co.CriteriaName, cr.CritName, dh.Finish, cr.RefNr, dh.RefNr FROM Combo co, "
sqlStrDef = sqlStrDef & "CritRes cr, DataHead dh WHERE cr.RefNr = dh.RefNr AND co.CriteriaName = cr.CritName AND"
sqlStrDef = sqlStrDef & " dh.Finish = true ORDER by cr.CritName"
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = strConn
objCommand.CommandText = sqlStrDef
'executing and resetting to Nothing
objCommand.CommandType = adCmdText
Set objRS = objCommand.Execute
Set objCommand = Nothing
if objRS.eof then
response.write "<br>There are no record selected<br>"
else
objRS.movefirst
strTest = ""
strTestOld = ""
testedCritCtr = 0
while not objRS.eof
strTest = objRS("CritName")
response.write strTest & "<br>"
while objRS("CritName") = strTest
response.write "same <br>"
objRS.moveNext
Wend
response.write "<br><br>NEW<br><br>"
Wendend ifobjRS.close%>
... there is always more to learn...
__________________
... there is always more to learn...
|