//  home   //  advanced search   //  news   //  categories   //  sql build chart   //  downloads   //  statistics
 ASP FAQ 
Home
ASP FAQ Tutorials

   8000XXXX Errors
   Alerts
   ASP.NET 2.0
   Classic ASP 1.0
   Databases
   General Concepts
   Search Engine Optimization (SEO)

Contact Us
Site Map

Search

Web
aspfaq.com
tutorials.aspfaq.com

ASP FAQ Tutorials :: 8000XXXX Errors :: Why do I get 800A0CC1 errors?


Why do I get 800A0CC1 errors?

When working with a resultset in ASP and you do this: 
 
<% 
    ... 
    Response.Write(rs("columnName")) 
%> 
 
... you may get the following error: 
 
ADODB.Recordset (0x800A0CC1) 
Item cannot be found in the collection corresponding to the requested name or ordinal. 
 
... even though columnName is clearly being returned in the resultset when you run the procedure from Query Analyzer. 
 
Sometimes this is because you've misspelled the column name, referred to an aggregate without using an alias (see Article #2159), referenced a column name that appears more than once in the SELECT list (e.g. a JOIN between two tables that have a common column), or even referenced the wrong resultset in the case of multiple resultsets. If you are having one of these problems, you can correct them quite easily by referencing the column correctly, or the correct recordset. If you have a JOIN that has two columns with the same name, you probably have a design issue because (a) if the columns contain the same value, you don't need both in the resultset; and (b) if the columns don't contain the same value, then they have different meanings, and therefore should have distinct names. 
 
But most often it is because you're using a stored procedure, and ADO is incorrectly interpreting messages in QA's messages tab, for example: 
 
1 row(s) affected 
 
... as a resultset, however there are no columns in the data pane, so it is useless except for debugging within Query Analyzer. 
 
You can correct this behavior by adding the following to the top of your procedure: 
 
SET NOCOUNT ON 
 
This prevents the messages from factoring into your ASP code. 
 
If your database code is not changeable, you might experiment with adding set rs = rs.nextRecordset() lines until you hit the first 'real' resultset. 
 
The use of SET NOCOUNT ON is demonstrated in Article #2201 ...

Related Articles

Why do I get 8002000A errors?
Why do I get 80040200 / 80040514 / 800A0E7A errors?
Why do I get 80040e09 errors?
Why do I get 80040E0C errors?
Why do I get 80040E10 errors?
Why do I get 80040E14 errors?
Why do I get 80040E21 errors?
Why do I get 80040E23 errors?
Why do I get 80040E24 errors?
Why do I get 80040E2F errors?
Why do I get 80040e30 errors?
Why do I get 80040E31 errors?
Why do I get 80040E37 errors?
Why do I get 80040e4e errors?
Why do I get 80040E54 errors?
Why do I get 80040E57 / 80040E07 errors?
Why do I get 8004D00A errors?
Why do I get 80070070 errors?
Why do I get 800A01FB errors?
Why do I get 800A0BB9 / 800A1391 errors?
Why do I get 800A0C93 errors?
Why do I get 800a0cb3 errors?
Why do I get 800A0E78 errors?
Why do I get 800A0E7C errors?
Why do I get 800A0E7D errors?
80004005 Errors
Can I use the NZ() function without getting 80040E14 errors?

 

 


Created: 4/15/2002 | Last Updated: 8/18/2002 | broken links | helpful | not helpful | statistics
© Copyright 2006, UBR, Inc. All Rights Reserved. (116)

 

Copyright 1999-2006, All rights reserved.
Finding content
Finding content.  An error has occured...