Skip to main content
Inspiring
January 8, 2009
Question

ASP error on empty recordset field

  • January 8, 2009
  • 1 reply
  • 664 views
I have several empty fields in my database. And they should be empty.
When I make a repeat region in my table made from an ASP recordset my page gives an error on the empty field.

Error Type:
ADODB.Fields (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/spxcrm/slsKlantSelectiePlaats.asp, line 82


Any tips on fixing this?

Thanks.
This topic has been closed for replies.

1 reply

Inspiring
January 9, 2009
PaulTest wrote:
> I have several empty fields in my database. And they should be empty.
> When I make a repeat region in my table made from an ASP recordset my page
> gives an error on the empty field.
>
> Error Type:
> ADODB.Fields (0x800A0CC1)
> Item cannot be found in the collection corresponding to the requested name or
> ordinal.
> /spxcrm/slsKlantSelectiePlaats.asp, line 82
>
>
> Any tips on fixing this?
>
> Thanks.

This will only display the contents of the field if there is content in it:
<% If Recordset.Fields.Item("fieldname") <> "" Then
%><%=Recordset.Fields.Item("fieldname")%><% End if %>

But I think your error says something else, its saying the field doesn't
exist in the SELECT statement, maybe its spelt incorrectly?

Dooza