Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 10th, 2004, 06:32 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
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...
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.