Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Why isn't the column name found?

Posted on 2007-11-25
2
Medium Priority
?
636 Views
Last Modified: 2013-11-27
Problem URL - http://projects.zanalysts.com/ariviewer/display.asp?ID=11 

I'm using Access as the "database".

I get this error in the above URL:

ADODB.Fields error '800a0cc1'
Item cannot be found in the collection corresponding to the requested  name or ordinal.
/ariviewer/display.asp, line 498

I know it's telling me that it cannot find the column name on the table.

Here is line 498:

If tables(tableID) <> "Husqvarna Equpment" Then
     Response.Write("<td>" & Recordset1.Fields.Item("Day").Value & "</td>")
     Response.Write("<td>" & Recordset1.Fields.Item("Week").Value & "</td>")
     Response.Write("<td>" & Recordset1.Fields.Item("Month").Value & "</td>")
Else
     Response.Write("<td>" & Recordset1.Fields.Item("Price").Value & "</td>")
End If

However if you go to this URL - http://projects.zanalysts.com/ariviewer/test.asp 
- it displays the table name followed by the column names for this table delimited by "-".

-Husqvarna Equipment-
-Equipment Description-
-ID-
-Price-

Unless my eyes are totally deceiving me, there is a column called "Price" in the Husqvarna table. The code below is used to display the column names.

For Each objTable in objADOXDatabase.Tables
   If objTable.Type = "TABLE" then
      tables(i) = objTable.Name
      If tables(i) = "Husqvarna Equipment" Then
         Response.Write("-" & tables(i) & "-" & "<br>")
         For Each objColumn in objTable.Columns
            Response.Write("-" & objColumn.Name & "-" & "<br>")
         Next
      End If
      i = i + 1
   End If
Next

Can someone please help me identify what I am missing?

Thank you!


0
Comment
Question by:bigmoxy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
spprivate earned 800 total points
ID: 20347589
Spelling mistake.
You have written  Husqvarna Equpment instead of Husqvarna Equipment.
Missing "i". does it help?
0
 

Author Closing Comment

by:bigmoxy
ID: 31410903
OMG! I was staring at the code for so long I couldn't see the obvious. Thank you!!
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question