Re: Item Cannot be Found in Collection

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Apologies for the delay in responding.

The first thing you need to change is;

"Select * ...."

See: http://aspfaq.com/show.asp?id=2096

With regard to the error you are receiving however, the most common reason
for this occuring is due to the mis-spelling of a column name. For example,
if I wanted to access fldMembers, I'd typically use;

'// Where oDB is my connection to the database
sSQL = "SELECT fldMembers from tblMyTable"
Set fRst = oDB.Execute(sSQL)

Then to write this out to the page;

Response.Write fRst("fldMembers")

If however, I instead wrote this as;

Response.Write fRst("fld_Members")

I would receive an error telling me the item could not be found in the
collection.

The "SELECT * ..." although getting all field names into the collection,
cannot account for any misspelling when outputting it to the browser.

Why your code has worked for 3 years and suddenly broken however, is
something I cannot answer as this will typically not happen unless someone
has changed part of the code.

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"GrandMaMa" <GrandMaMa@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C40BD40C-CF12-46CE-93B3-6FC06BEEEF5F@xxxxxxxxxxxxxxxx
> Steven:
> Thanks for the sugestion.
>
> I tried Set NOCOUNT = ON and I got a syntax error. I am also confused
> with with Article # 2159. I have never used Count(Column) before and none
of
> my programmers manuals show it.
>
> This is my current SQL which I thought was very simple.
>
> rsSurveys.Open "SELECT * FROM SURVEYS", cnnct, 3, 3
> There are 47 Fields in the Surveys Table.
>
> Can you give me an example as to what to change? I keep getting syntax
> errors in what I have tried. However I am having a hard time with the
fact
> that this worked for over three years and now fails!
>
> Thanks Again
>
> Granny
>
>
> "Steven Burn" wrote:
>
> > http://aspfaq.com/show.asp?id=2275
> >
> > --
> > Regards
> >
> > Steven Burn
> > Ur I.T. Mate Group
> > www.it-mate.co.uk
> >
> > Keeping it FREE!
> >
> > "GrandMaMa" <GrandMaMa@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:76F1BC4C-4305-402F-9185-AE92BBDFDF6E@xxxxxxxxxxxxxxxx
> > > For over 3 years I have used the same Question and Answer Web Page
without
> > > any changes to the page or Access Database.
> > >
> > > Three weeks ago I started getting the Item Cannot be Found in
Collection
> > > halt after I did a Microsoft update.
> > >
> > > The Record has 47 fields that are updated for test surveys by the
> > activities
> > > educators in our school district. 33 Fields are Long Integer, 13 are
Byte
> > > Fields and one a Text Field.
> > >
> > > Does anyone know what was changed that would all of a sudden give me
this
> > > halt.
> > >
> > > Thanks for the help in advance!
> > >
> > > Granny
> >
> >
> >


.



Relevant Pages

  • Re: Item Cannot be Found in Collection
    ... Regards ... Steven Burn ... Ur I.T. Mate Group ... > halt after I did a Microsoft update. ...
    (microsoft.public.scripting.vbscript)
  • Re: DSNLess connection
    ... Regards ... DO NOT stick the database in reach of the outside world (stick it ... > Steven Burn ... > Ur I.T. Mate Group ...
    (microsoft.public.inetserver.asp.db)
  • Re: Why cant I test class functions from the Immediate window?
    ... Regards ... >> Steven Burn ... >>> I created a Class module in that project. ... >>> I am able to test them from the Immediate window. ...
    (microsoft.public.vb.general.discussion)
  • Re: active x control
    ... Regards ... >> Steven Burn ... >> Ur I.T. Mate Group ... >>> doc file that ocx is using. ...
    (microsoft.public.scripting.vbscript)
  • Re: include file asp
    ... Regards ... the name of the file is a field in the database. ... > Steven Burn ... > Ur I.T. Mate Group ...
    (microsoft.public.scripting.vbscript)