Re: Item cannot be found in the collection corresponding to the requested name or ordinal

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Bob Barrows (reb01501_at_NOyahoo.SPAMcom)
Date: 03/16/04


Date: Tue, 16 Mar 2004 16:28:44 -0500

Baris Bicakci wrote:
> It took me a week to handle it, EVEN tho I knew that there were some
> "RESERVED WORD"s
>
> I tried 56432943289 variations of connecting to the database but
> somehow it was impossible. Here is that's why:
>
> Remember the table that I can retrieve info from but can't write
> anything in it. Name of that table was "CATALOG"
>
> CATALOG is a reserved word for ODBC !
>
> So then, How can it be possible to retrieve info from a table named
> mistakenly with a reserved word ?

It is possible by delimiting the word with brackets []. This tells the
parser to pass it as-is.

That said, it is a much better idea to change the name of the table.

Bob Barrows

-- 
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


Relevant Pages

  • Re: Item cannot be found in the collection corresponding to the requested name or ordinal
    ... It took me a week to handle it, EVEN tho I knew that there were some ... CATALOG is a reserved word for ODBC! ... How can it be possible to retrieve info from a table named ...
    (microsoft.public.inetserver.asp.db)
  • Re: insert into error
    ... This is the first time I've seen a reserved word impact the ... columns listed inside the parentheses of an INSERT clause. ... past and I assumed the parser was ignoring the words inside the parentheses. ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)