473,396 Members | 1,921 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,396 software developers and data experts.

using multiple select

Hey gang. I have a form to select multiple names.
The problem I am having, is when it gets to the asp page. If I click 1 name,
it will process. But multiple names gives me an error:
Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.
/GIG/ladder/reportasp2_new.asp, line 53

that line's code is

set rsID2 = conn.execute ("select total_score from rounds where username =
'" & var1 & "'")
var11 = rsID2.fields.item("total_score").value

what appears to be happening, is it isn't picking up all the names.

on the asp page, i begin the code with this.

For Each Item In Request.QueryString("username") and have a NEXT at the end
of the code.

this is using access db

i don't know what i am missing

If i do a response.write it gives the names twice for some reason.
i made a dummy page, just to see how the names are getting sent, but they
are getting repeated. this is the code

<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open (MM_connection_STRING)
%>

<%
For Each Item In Request.QueryString("username")
var1 = Request.querystring("username") 'first player
var2 = Request.querystring("username1") 'person reporting

response.write var1
if UCASE(var1) = UCASE(var2) then
response.redirect "report_self.asp"
else
end if

Next

Conn.Close
Set Conn = Nothing
'response.redirect "current.asp"


%>
test it here to see what i mean

http://www.gig-gamers.com/GIG/ladder/report_new.asp

can anyone help??
Mar 17 '06 #1
4 1606
I even made it real simple. i put this as the code

For Each item In Request.QueryString("username")
Response.Write Request.QueryString("username")& "<BR>"

and it is still doubling the results.
"Jeff" <gi*****@adelphia.net> wrote in message
news:xs******************************@adelphia.com ...
Hey gang. I have a form to select multiple names.
The problem I am having, is when it gets to the asp page. If I click 1
name, it will process. But multiple names gives me an error:
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.
/GIG/ladder/reportasp2_new.asp, line 53

that line's code is

set rsID2 = conn.execute ("select total_score from rounds where username =
'" & var1 & "'")
var11 = rsID2.fields.item("total_score").value

what appears to be happening, is it isn't picking up all the names.

on the asp page, i begin the code with this.

For Each Item In Request.QueryString("username") and have a NEXT at the
end of the code.

this is using access db

i don't know what i am missing

If i do a response.write it gives the names twice for some reason.
i made a dummy page, just to see how the names are getting sent, but they
are getting repeated. this is the code

<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open (MM_connection_STRING)
%>

<%
For Each Item In Request.QueryString("username")
var1 = Request.querystring("username") 'first player
var2 = Request.querystring("username1") 'person reporting

response.write var1
if UCASE(var1) = UCASE(var2) then
response.redirect "report_self.asp"
else
end if

Next

Conn.Close
Set Conn = Nothing
'response.redirect "current.asp"


%>
test it here to see what i mean

http://www.gig-gamers.com/GIG/ladder/report_new.asp

can anyone help??

Mar 17 '06 #2
Jeff wrote on 17 mrt 2006 in microsoft.public.inetserver.asp.general:
I even made it real simple. i put this as the code

For Each item In Request.QueryString("username")
Response.Write Request.QueryString("username")& "<BR>"


This looks strange, you want to write the collection object several
times?

Shouldn't it be:

For Each X In Request.QueryString("username")
Response.Write X & "<BR>"
Next

==============

But then:

Request.QueryString() is not a collection but a string ALWAYS.

So I suppose it contains a comma + space seperated string.

Try this:

================ test.asp ====================
<% ' vbscript

Response.Write request.querystring("q") & "<br>=======<br>"

q=split(request.querystring("q"),", ")

for i=0 to ubound(q)
Response.Write q(i) & "<br>"
next

%>
<form>
<input type=checkbox name=q value=a checked>
<input type=checkbox name=q value=b checked>
<input type=checkbox name=q value=c checked>
<input type=checkbox name=q value=d checked>
<input type=checkbox name=q value=e checked>
<input type=submit>
</form>
====================================
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 17 '06 #3
I got it to work. this is what I ended up doing
For I = 1 To Request.QueryString("username").Count
that way it was counting, and only displaying each name once.

thanks for the help

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn*******************@194.109.133.242...
Jeff wrote on 17 mrt 2006 in microsoft.public.inetserver.asp.general:
I even made it real simple. i put this as the code

For Each item In Request.QueryString("username")
Response.Write Request.QueryString("username")& "<BR>"


This looks strange, you want to write the collection object several
times?

Shouldn't it be:

For Each X In Request.QueryString("username")
Response.Write X & "<BR>"
Next

==============

But then:

Request.QueryString() is not a collection but a string ALWAYS.

So I suppose it contains a comma + space seperated string.

Try this:

================ test.asp ====================
<% ' vbscript

Response.Write request.querystring("q") & "<br>=======<br>"

q=split(request.querystring("q"),", ")

for i=0 to ubound(q)
Response.Write q(i) & "<br>"
next

%>
<form>
<input type=checkbox name=q value=a checked>
<input type=checkbox name=q value=b checked>
<input type=checkbox name=q value=c checked>
<input type=checkbox name=q value=d checked>
<input type=checkbox name=q value=e checked>
<input type=submit>
</form>
====================================
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Mar 17 '06 #4
Jeff wrote:
I got it to work. this is what I ended up doing
For I = 1 To Request.QueryString("username").Count
that way it was counting, and only displaying each name once.


Evertjan was right, though. In your original example, you were writing the
entire collection once per row.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Mar 17 '06 #5

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

Similar topics

6
by: Ben Hallert | last post by:
Hi guys, I'm trying to figure out what bone headed mistake I made on something I put together. I've got a form (named 'context') that has a variable number of select-multiple inputs on it. ...
4
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. ...
2
by: areef.islam | last post by:
Hi, I am kinda new to javascript and I am having this problem with selecting multiple options from a select tag. Hope someone can help me out here. here is my code...
1
by: abhishekhs | last post by:
Hi all I have more than one multiple select lists in a page. Something like this <tr> <td> <select NAME="StrainList" ID="StrainList" SIZE="5" multiple="multiple" style="width: 150px"> <?...
2
by: Problematic coder | last post by:
I have a need in an application to have the ability to select multiple values in some kind of drop down list or maybe even a html type select box. I have found there doesn't seem to be an option...
0
debasisdas
by: debasisdas | last post by:
Using Subqueries ================== The sub query is often referred to as a nested SELECT, Sub - SELECT, or inner SELECT statement. The sub query executes once before the main query. The...
1
debasisdas
by: debasisdas | last post by:
Using Co-related sub query ======================== While a subquery is evaluated only once for each table, a correlated subquery is evaluated once for each row. Sub query can take value from...
92
by: bonneylake | last post by:
Hey Everyone, Well i was hoping someone could explain the best way i could go about this. i have a few ideas on how i could go about this but i am just not sure if it would work. Right now i...
482
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place. ...
6
by: phpnewbie26 | last post by:
My current form has one multiple select drop down menu as well as few other drop down menus that are single select. Originally I had it so that the multiple select menu was first, but this created...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.