Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 28th, 2004, 09: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

Reply With Quote
  #2 (permalink)  
Old March 28th, 2004, 10: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.

Reply With Quote
Reply


Thread Tools
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
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 05:03 AM



All times are GMT -4. The time now is 07:31 PM.


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