Question
Why do I get 800A0CC1 errors?

Answers

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 ...
  Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q Acid rain is due to air pollution by?
  • Q SQL statements execution order.
  • Q What is tCL timing?
  • Q Can WordPress use cookies
  • Q You are creating an ASP.NET page to enroll new members in a health care program for TestKing employees. One of the requirements for membership is that a participant must be at least 65 years old. You need to ensure that each prospective member enters a name in a TextBox control named nameTextBox and a date of birth in a TextBox control named birthdayTextBox. In addition, you need to verify that prospective members meet the age requirement.What should you do? A. Add a CustomValidator to the page. In the Properties window, set the ControlToValidate property to birthdayTextBox. Write code to validate the date of birth. Add a RegularExpressionValidator control to the page. In the Properties window, set the ControlToValidate property to nameTextBox, and create a regular expression to validate the name. B. Add a CompareValidator control to the page. In the Properties window, set the ControlToValidate property to birthdayTextBox. Write code that sets the Operator and ValueToCompare properties to validate the date of birth. Add a RequiredFieldValidator control to the page. In the Properties window, set the ControlToValidate property to nameTextBox. C. Add a RangeValidator control to the page. In the Properties window, set the ControlToValidate property to birthdayTextBox. Write code that sets the MinimumValue and MaximumValue properties to validate the date of birth. Add a CompareValidator control to the page. In the Properties window, set the ControlToValidate property to nameTextBox. Add a second CompareValidator control to the page. In the Properties window, set the ControlToValidate property to birthdayTextBox. Write code that sets the Operator and ValueToCompare properties of the two CompareValidator controls to validate the name and date of birth. D. Add a CustomValidator control to the page. In the Properties window, set the ControlToValidate property to birthdayTextBox, and write code to validate the date of birth. Add a RequiredFieldValidator control to the page. In the Properties window, set the ControlToValidate property to nameTextBox. Add a second RequiredFieldValidator control to the page. In the Properties window, set the ControlToValidate property to birthdayTextBox.
  • Q Explain the contents that are a part of dclgen?
  • Q Define the term sovereignty mean in international law?
  • Q You are aware of ATMs, Right. Can you quote some disadvantages of ATM?
  • Q The ditches or fossae of which celestial body is named after sacred bodies of water?
  • Q In which state Bhimbetka caves are situated?
  • Q Under the new Committee system launched in April 1993, out of the 17 Standing Committees