Why isn"t the column name specified in code found on the table?
am 25.11.2007 23:53:07 von Big Moxy
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("
" & Recordset1.Fields.Item("Day").Value & "
td>")
Response.Write(" | " & Recordset1.Fields.Item("Week").Value & "
td>")
Response.Write(" | " & Recordset1.Fields.Item("Month").Value &
" | ")
Else
Response.Write("" & Recordset1.Fields.Item("Price").Value &
" | ")
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) & "-" & "
")
For Each objColumn in objTable.Columns
Response.Write("-" & objColumn.Name & "-" & "
")
Next
End If
i = i + 1
End If
Next
Can someone please help me identify what I am missing?
Thank you!
Re: Why isn"t the column name specified in code found on the table?
am 26.11.2007 03:25:13 von Big Moxy
On Nov 25, 2:53 pm, Big Moxy wrote:
> 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("" & Recordset1.Fields.Item("Day").Value & "
> td>")
> Response.Write(" | " & Recordset1.Fields.Item("Week").Value & "
> td>")
> Response.Write(" | " & Recordset1.Fields.Item("Month").Value &
> " | ")
> Else
> Response.Write("" & Recordset1.Fields.Item("Price").Value &
> " | ")
> 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) & "-" & "
")
> For Each objColumn in objTable.Columns
> Response.Write("-" & objColumn.Name & "-" & "
")
> Next
> End If
> i = i + 1
> End If
> Next
>
> Can someone please help me identify what I am missing?
>
> Thank you!
Duh! I misspelled the table name in my code.