Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 10th, 2004, 06:32 PM
Authorized User
 
Join Date: Jun 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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...





Similar Threads
Thread Thread Starter Forum Replies Last Post
Generic error occured in GDI+ labby C# 0 December 19th, 2006 09:57 AM
An unidentified error has occured p2ptolu MySQL 0 October 28th, 2005 07:40 AM
A unidentified error has occured. malachany Dreamweaver (all versions) 6 February 4th, 2005 10:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.