If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > ADODB.Fields (0x800A0CC1)!!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-28-05, 04:58
peelola peelola is offline
Registered User
 
Join Date: Dec 2005
Posts: 6
ADODB.Fields (0x800A0CC1)!!!

I get the error ADODB.Fields (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.

I know what is happening in that there is no data for the specified field.

Basically I have a crosstab in access displaying the results of a query, but I am unable to view this via my asp page as not all the fields have a value as yet.

I think I can over come this either one of two ways.

1. Get the cross tab to display 0 instead of displaying nothing when their is nothing to count

or

2. Somehow get the asp page to return a null or 0 value if nothing appears from the query.


The query in access is as follows.

Code:
TRANSFORM Count(statusreporthsc.SDC1) AS CountOfSDC1
SELECT statusreporthsc.date2, Count(statusreporthsc.SDC1) AS [Total Of SDC1]
FROM statusreporthsc
GROUP BY statusreporthsc.date2
PIVOT statusreporthsc.Category;
and the section of the asp page displaying the results is as follows

Code:
    <tr>
      <td align="left" width="14%"><%=(Recordset1.Fields.Item("date2").Value)%> </td>
      <td align="left" width="14%"><%=(Recordset1.Fields.Item("HOD (SDC) Request").Value)%> </td>
      <td align="left" width="14%"><%=(Recordset1.Fields.Item("Mini Consultancy").Value) %> </td>
      <td align="left" width="14%"><%=(Recordset1.Fields.Item("Mini Project").Value)%> </td>
      <td align="left" width="14%"><%=(Recordset1.Fields.Item("Site Project").Value)%> </td>
      <td align="left" width="14%"><%=(Recordset1.Fields.Item("Total Of SDC1").Value)%> </td>
    </tr>
    <%
I really hope this makes sense to someone and you can help me.

Many thanks
Reply With Quote
  #2 (permalink)  
Old 12-29-05, 18:05
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
you could try something like this....
Code:
    <tr>
      <%
      fieldcount = Recordset1.Fields.Count
      for n = 0 to fieldcount -1
      %>
      <td align="left" width="14%"><%=(Recordset1.Fields(n))%> </td>
      <%
      next
      %>
    </tr>
It's been ages since I have done something like that so the syntax probably isn't quite right but you should be able to get it there.
Reply With Quote
  #3 (permalink)  
Old 01-02-06, 19:39
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
Quote:
I get the error ADODB.Fields (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.

I know what is happening in that there is no data for the specified field.
In my opinion it means that the field itself doesn't exist (regardless of whether it might contain data or not).
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
  #4 (permalink)  
Old 01-12-06, 16:47
fredservillon fredservillon is offline
Registered User
 
Join Date: Oct 2005
Posts: 178
DOn't forget your field index as..

Recordset1.Fields(i)
Reply With Quote
  #5 (permalink)  
Old 01-16-06, 05:36
kropes2001 kropes2001 is offline
Registered User
 
Join Date: Nov 2005
Location: Honolulu HI
Posts: 118
Paul is right.

you are trying to display a piece of data (field) but that field is not contained in teh recordest you are building.

one of those 6 fields is not in the recordset. data content doesnt matter
__________________
.
.
http://www.GetMySiteOnline.com - Can you help me Get My Site Online ? (Yes. That is EXACTLY what we do.)

http://www.GetMySiteOnline.com/FightingSpam/
__________________________
caeli enarrant gloriam Dei !
Reply With Quote
  #6 (permalink)  
Old 01-16-06, 10:14
fredservillon fredservillon is offline
Registered User
 
Join Date: Oct 2005
Posts: 178
SInce you already have your Data Source as Recordset1, use for example
<%= Recordset1("date2") %>
or if using array fields use the index
as ..
<%= Recordset1.fields(0).value %>
<%= Recordset1.fields(1).value %>

The way you have it does not specify the fields that's why you are having the fields error.

check rokslide posting above for format

Last edited by fredservillon; 01-16-06 at 10:18.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On