Another basic sql

J

Jeff

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
 
R

Ray Costanzo [MVP]

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
 
J

Jeff

Ray Costanzo said:
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??
 
J

Jeff

ok. i feel like a complete idiot. i figured it out.
should have been admin3 not admin4
thanks anyway

bam
 
B

Bob Lehmann

should have been admin3 not admin4
Neither of which were mentioned in you r original post.

Bob Lehmann
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,088
Latest member
JeremyMedl

Latest Threads

Top