Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics 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 September 8th, 2004, 03:10 AM
Authorized User
 
Join Date: Aug 2004
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Prabhakar_dt
Default sole the error 0x80020009

Hi to all of u....Please look at my problem...



<%
    dim rs,rs1
        set rs=server.CreateObject ("adodb.recordset")
        set rs1=server.CreateObject ("adodb.recordset")
       rs.Open "select *from QQ1to75",con,adOpenForwardOnly,adLockOptimistic,ad cmdtxt
        rs1.Open "select *from answer",con,adOpenForwardOnly,adLockOptimistic,adc mdtxt
                dim counter
                        counter=0
                        punter=0
                        while not rs.EOF
                        if rs("Q_id")=rs1("Q_id") then
                           if rs("answer")=rs1("answer") then
                              counter=counter+1
                           else
                              punter=punter+1
                           end if
                       end if
                       rs1.MoveNext
                       rs.MoveNext
                       wend
                       session("count")=counter
                       session("punt")=punter
                       rs.Close
                       rs1.Close
              session("count")=counter
              session("punt")=punter
                       set rs=nothing
                       set rs1=nothing
                       dim rs3
                       set rs3=server.CreateObject("adodb.recordset")
                       rs3.Open "delete * from answer",con


                       %>
 Number of right Answers - <%=session("count")%>
 Number of wrong Answers - <%=session("punt")%>

 When i run this project first time it shows correct answer, but when i click on the refresh button it shows error...


the error is at the line...
if rs("Q_id")=rs1("Q_id") then

Error Type:
(0x80020009)
Exception occurred.
/ver9/report2.asp, line 104


thanks

Prabhakar




Prabhakar Kumar
__________________
Prabhakar Kumar
 
Old September 8th, 2004, 04:18 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

maybe because u delete all from answer the 1st time u run it, so 2nd time there are no answers to compare?
 
Old September 8th, 2004, 04:59 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Cross post at
http://p2p.wrox.com/topic.asp?TOPIC_ID=18850

Numan
--------------------------------------------------
Love is the most precious thing of this world. So find and grab it!
 
Old September 10th, 2004, 10:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Prabhakar,

Try displaying both rs("Q_id") and rs1("Q_id") using response.write before the IF statement. Use response.end to stop the page processing once you display those values, to see that result. That would give you an idea of what you are missing.

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
ADODB.Field (0x80020009) susman SQL Server ASP 0 November 2nd, 2007 03:04 AM
Need some help ErrorType: ADODB.Field (0x80020009) nouky SQL Server ASP 0 May 2nd, 2006 04:36 PM
Exception Occured (0x80020009) problem dominic_huang Classic ASP Databases 1 November 17th, 2004 01:13 AM
plese solve error 0x80020009 Prabhakar_dt Classic ASP Basics 1 September 8th, 2004 04:37 AM





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