Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Another basic sql

Reply
Thread Tools

Another basic sql

 
 
Jeff
Guest
Posts: n/a
 
      01-11-2006
ok. using access and asp, can someone tell me why i would be getting this
error?

script

set admin4 = conn.execute("select count(username) as cnt3 from members2
where username not in (select top 16 username from members2 order by
total_score desc)")

error

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

/GIG/Tourney/admin/td_admin.asp, line 11

username and total_score are both in the table. could it be because there
aren't 16 records present yet??

Bam


 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      01-12-2006
What does the code on line 11 look like? How are you attempting to get your
count value? You're not doing yourRS("username"), are you?

Does this query work when you copy and paste it into the query window in
Access?

Ray at home


"Jeff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> ok. using access and asp, can someone tell me why i would be getting this
> error?
>
> script
>
> set admin4 = conn.execute("select count(username) as cnt3 from members2
> where username not in (select top 16 username from members2 order by
> total_score desc)")
>
> error
>
> Item cannot be found in the collection corresponding to the requested name
> or ordinal.
>
> /GIG/Tourney/admin/td_admin.asp, line 11
>
> username and total_score are both in the table. could it be because there
> aren't 16 records present yet??
>
> Bam
>
>



 
Reply With Quote
 
 
 
 
Jeff
Guest
Posts: n/a
 
      01-12-2006

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:(E-Mail Removed)...
> What does the code on line 11 look like?


Line 11 is what I pasted in my post

How are you attempting to get your
> count value? You're not doing yourRS("username"), are you?


i am getting the count value in the beginning if the statement as cnt3
count(username) as cnt3

i entered this into access:

SELECT count(username) AS cnt3
FROM members2
WHERE username not in (select top 16 username from members2 order by
total_score desc)

and i don't get an error. it displays the output as it should.
so the error lies on the asp page somewhere??



>
> Does this query work when you copy and paste it into the query window in
> Access?
>
> Ray at home
>
>
> "Jeff" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> ok. using access and asp, can someone tell me why i would be getting this
>> error?
>>
>> script
>>
>> set admin4 = conn.execute("select count(username) as cnt3 from members2
>> where username not in (select top 16 username from members2 order by
>> total_score desc)")
>>
>> error
>>
>> Item cannot be found in the collection corresponding to the requested
>> name or ordinal.
>>
>> /GIG/Tourney/admin/td_admin.asp, line 11
>>
>> username and total_score are both in the table. could it be because there
>> aren't 16 records present yet??
>>
>> Bam
>>
>>

>
>



 
Reply With Quote
 
Jeff
Guest
Posts: n/a
 
      01-12-2006
ok. i feel like a complete idiot. i figured it out.
should have been admin3 not admin4
thanks anyway

bam


"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:(E-Mail Removed)...
> What does the code on line 11 look like? How are you attempting to get
> your count value? You're not doing yourRS("username"), are you?
>
> Does this query work when you copy and paste it into the query window in
> Access?
>
> Ray at home
>
>
> "Jeff" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> ok. using access and asp, can someone tell me why i would be getting this
>> error?
>>
>> script
>>
>> set admin4 = conn.execute("select count(username) as cnt3 from members2
>> where username not in (select top 16 username from members2 order by
>> total_score desc)")
>>
>> error
>>
>> Item cannot be found in the collection corresponding to the requested
>> name or ordinal.
>>
>> /GIG/Tourney/admin/td_admin.asp, line 11
>>
>> username and total_score are both in the table. could it be because there
>> aren't 16 records present yet??
>>
>> Bam
>>
>>

>
>



 
Reply With Quote
 
Bob Lehmann
Guest
Posts: n/a
 
      01-12-2006
>> should have been admin3 not admin4
Neither of which were mentioned in you r original post.

Bob Lehmann

"Jeff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> ok. i feel like a complete idiot. i figured it out.
> should have been admin3 not admin4
> thanks anyway
>
> bam
>
>
> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
> message news:(E-Mail Removed)...
> > What does the code on line 11 look like? How are you attempting to get
> > your count value? You're not doing yourRS("username"), are you?
> >
> > Does this query work when you copy and paste it into the query window in
> > Access?
> >
> > Ray at home
> >
> >
> > "Jeff" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> ok. using access and asp, can someone tell me why i would be getting

this
> >> error?
> >>
> >> script
> >>
> >> set admin4 = conn.execute("select count(username) as cnt3 from members2
> >> where username not in (select top 16 username from members2 order by
> >> total_score desc)")
> >>
> >> error
> >>
> >> Item cannot be found in the collection corresponding to the requested
> >> name or ordinal.
> >>
> >> /GIG/Tourney/admin/td_admin.asp, line 11
> >>
> >> username and total_score are both in the table. could it be because

there
> >> aren't 16 records present yet??
> >>
> >> Bam
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      01-12-2006
No worries. All that matters is that it's fixed.

Ray at work

"Jeff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> ok. i feel like a complete idiot. i figured it out.
> should have been admin3 not admin4
> thanks anyway
>
> bam



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Reference, SQL Queries, SQL help ecoolone ASP .Net 0 01-03-2008 10:58 AM
What is the difference between Visual Basic.NET and Visual Basic 6? Jimmy Dean Computer Support 3 07-25-2005 07:05 AM
Another basic question: How to call and show one Web Form from another Web Form? Rob R. Ainscough ASP .Net Web Controls 3 06-14-2005 03:56 PM
Python interpreter in Basic or a Python-2-Basic translator. Engineer Python 6 05-01-2005 10:16 PM
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET Jaime MCSD 2 09-20-2003 05:16 AM



Advertisments