473,378 Members | 1,346 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Another basic sql

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
Jan 12 '06 #1
5 1283
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" <gi*****@adelphia.net> wrote in message
news:ms********************@adelphia.com...
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

Jan 12 '06 #2

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:OD**************@tk2msftngp13.phx.gbl...
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" <gi*****@adelphia.net> wrote in message
news:ms********************@adelphia.com...
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


Jan 12 '06 #3
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:OD**************@tk2msftngp13.phx.gbl...
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" <gi*****@adelphia.net> wrote in message
news:ms********************@adelphia.com...
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


Jan 12 '06 #4
>> should have been admin3 not admin4
Neither of which were mentioned in you r original post.

Bob Lehmann

"Jeff" <gi*****@adelphia.net> wrote in message
news:dL********************@adelphia.com...
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:OD**************@tk2msftngp13.phx.gbl...
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" <gi*****@adelphia.net> wrote in message
news:ms********************@adelphia.com...
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



Jan 12 '06 #5
No worries. All that matters is that it's fixed.

Ray at work

"Jeff" <gi*****@adelphia.net> wrote in message
news:dL********************@adelphia.com...
ok. i feel like a complete idiot. i figured it out.
should have been admin3 not admin4
thanks anyway

bam

Jan 12 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John | last post by:
Hello, I need to know which programs are opn on another machine in my network, these programs are opened from a shared drive on the server. How can I do this ? I've already dowloaded a sample...
7
by: jesse | last post by:
In java, one constructor can call another constructor through this(...) for instance class foo { public: foo(int k) { this(k,false)}; foo(int k, boolean m){...}; }
3
by: sparks | last post by:
I was copying fields from one table to another. IF the var name starts with milk I change it to egg and create it in the destination table. It works fine but I want to copy the description as...
26
by: Paul | last post by:
public class A { public A () { // here I would like to call the second version of _ctor, how to accomplish this ? } public A (int a, int b, int c) {
2
by: moonriver | last post by:
In a xml file, can we make reference to another xml file so that all contents of the latter xml file will be included into the first xml file? Had better give me an example for details.
2
by: Marcelo | last post by:
Hi guys, I'm using the following code to send values from one page to another, but seems to me, that the event Page_Load in the receiving page never fires. Why? This is the code: Thanks ...
14
by: Craig Buchanan | last post by:
If I have two custom vb.net classes, where 80% of the properties are alike and there is one method with a matching signature, can i cast between one and the other? do i need to have each class...
0
by: tonyrb | last post by:
Hi all, First time posting here. I was able to do this in Visual Basic 6, but in VB 2005 Express I am having a hard time with drag'n'drop. Version I am using is Visual Basic 2005 Express. ...
11
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have seen the terms Visual Basic 2005 and VB.NET. It seems that sometimes they seem to be referring to the same thing but sometimes they are not. I also run into terms like VB9 and VB10.
2
by: manontheedge | last post by:
I've got a program in C++, but I want to create a front end user interface for it using Visual Basic. I'm not looking for alternatives, I'm just curious, how would I do that? Just as a basic...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.