Wrox Programmer Forums
| 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 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
  #1 (permalink)  
Old March 28th, 2004, 10:25 PM
Registered User
 
Join Date: Jan 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error: Object is no longer valid.

This is the complete error message:

ADODB.Field error '80020009'

Object is no longer valid.

?

To see this in action w/debug, go to www.shreveportvotes.org/report/report.asp, enter 1/1/03 for start date and 1/5/03 for end date.

Here is the loop that it occurs in:
Code:
     Do While Not rs.EOF
        strSales = "Sales" & rs("ID")
        strShipping = "Shipping" & rs("ID")
        strQty = "Qty" & rs("ID")
        If Count.Exists(strSales) = True Then
            Response.Write "<tr>"
            Response.Write "<td>" & rs("Title") & "</td>" & vbcrlf
            Response.Write "<td>"
            'Response.Write Count.Item(strQty)
            Response.Write "</td>"  & vbcrlf & "<td>"
            Response.Write FormatCurrency(Count.Item(strSales))
            Response.Write "</td>"  & vbcrlf & "<td>"
            Response.Write "rs(""ID""): <b>" & rs("ID") & "</b><br>" & vbcrlf
            Response.Write "strShipping: <b>" & strShipping & "</b><br>" & vbcrlf
            Response.Write "Count.Exists(strShipping): <b>" & Count.Exists(strShipping) & "</b><br>" & vbcrlf
            Response.Write "not using adodb now!, next line is '<b>Response.Write Count.Item(strShipping)</b>'." & vbcrlf
            Response.Write Count.Item(strShipping)
            Response.Write "</td>" & vbcrlf
            strSalesTotal = strSalesTotal + Count.Item(strSales)
            strShippingTotal = strShippingTotal + Count.Item(strShipping)
            'strQtyTotal = strQtyTotal + Count.Item(strQty)
        End If
        rs.MoveNext
    Loop
'Count' is a dictionary object that is populated earlier in the code, using the same keys you see in the above code:

Code:
strSales = "Sales" & rs("ID")
strShipping = "Shipping" & rs("ID")
strQty = "Qty" & rs("ID")
Note that the code for displaying the quantities are commented out solely because they cause the same problems as the shipping totals do.

While the error message doesn't specify a line, I'm fairly sure that it is this one here:

Code:
Response.Write Count.Item(strShipping)
because commenting out that line, as well as this one:

Code:
strShippingTotal = strShippingTotal + Count.Item(strShipping)
allows the page to load completely.

I don't understand why this is an ADODB.fields error, as the this isn't referencing an ADODB object, just the dictionary object. Are they somehow related? Also, both the ADODB object and the dictionary object are successfully referenced earlier in the loop. I am completely stumped on this one. Any help would be much appreciated. Thanks!

Dan

  #2 (permalink)  
Old March 28th, 2004, 11:30 PM
Registered User
 
Join Date: Jan 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Fixed... it was a data type problem... OY.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: "Specified cast not valid" on ItemDataBoun snejsnej ASP.NET 1.0 and 1.1 Professional 0 May 24th, 2006 05:36 PM
error 'File format no longer supported' Kris DExelle VB Components 2 May 15th, 2006 05:10 PM
Object no longer instanceof object pepejeria BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 8 May 12th, 2006 08:32 AM
ERROR: SET AUTOCOMMIT TO OFF is no longer support chemi Java Databases 0 December 28th, 2005 06:03 AM





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