Hello,


I'm having a strange problem. I get an error "Item cannot be found in
the collection corresponding to the request name or orginal," even
though WEISGSUPPORT is contained within the BladeAlias column:


Set objRecordSet = objConnection.Execute("Select BladeOwner,
CageSerialNum, SlotNum FROM SMBlades WHERE BladeAlias =
'WEISGSUPPORT';")

Do While Not objRecordset.EOF
strResults = strResults & objRecordSet("BladeAlias") & vbnewline
objRecordset.MoveNext
Loop



I get the error at the first line in the do...loop.


Why is this happening? It's driving me crazy!


Thanks for the help,

Matt

Re: SQL query: Error as if column is not there? by Bob

Bob
Mon Aug 14 16:10:22 CDT 2006

Matt Brown - identify wrote:
> Hello,
>
>
> I'm having a strange problem. I get an error "Item cannot be found in
> the collection corresponding to the request name or orginal," even
> though WEISGSUPPORT is contained within the BladeAlias column:
>
>
> Set objRecordSet = objConnection.Execute("Select BladeOwner,
> CageSerialNum, SlotNum FROM SMBlades WHERE BladeAlias =
> 'WEISGSUPPORT';")
>
> Do While Not objRecordset.EOF
> strResults = strResults & objRecordSet("BladeAlias") & vbnewline
> objRecordset.MoveNext
> Loop
>
>
>
Look at your query. I see three fields mentioned: BladeOwner,
CageSerialNum, and SlotNum.

Why would you expect the recordset to contain a field called
"BladeAlias"?

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Re: SQL query: Error as if column is not there? by Matt

Matt
Mon Aug 14 18:07:59 CDT 2006

Hah! Thanks.


Bob Barrows [MVP] wrote:
> Look at your query. I see three fields mentioned: BladeOwner,
> CageSerialNum, and SlotNum.
>
> Why would you expect the recordset to contain a field called
> "BladeAlias"?
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.