.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 24th, 2002, 04:50 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
passing multiple values

<i><b>Originally posted by : bonner (bonner1975@yahoo.com)</b></i><br />I have a dropdown list that a user can select multiple values from. I want to pass this information to a Store Procedure in SQL and get back a result set. How would I go about doing it? Thanks for any help you can give.

Reply With Quote
  #2  
Old April 30th, 2002, 11:08 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : steve</b></i><br />once you select all the values inside the multiple list box, this is a comma-delimited valueset. you'd have to loop through to parse tha values.<br /><br /><br />------------<br />bonner at 4/24/2002 2:50:54 PM<br /><br />I have a dropdown list that a user can select multiple values from. I want to pass this information to a Store Procedure in SQL and get back a result set. How would I go about doing it? Thanks for any help you can give.

Reply With Quote
  #3  
Old May 1st, 2002, 01:41 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : bonner (bonner1975@yahoo.com)</b></i><br />Thanks. I did parse out the values. See the code below. What's happening now is that it is returning only the result set of the last value. I must be doing something wrong. Any help you can give would be great.<br /><br /><%newparam = request("paramname")<br /> start = 1<br /> LastComma=Instr(start,newparam,",",vbTextCompare)<br />%><br /><br /> <% If ( LastComma > 0 ) Then %> <br /> <%While ( LastComma > 0 )%><br /> <%tempstr = Mid(newparam,start,LastComma-start)%><br /> <%=tempstr%><BR> <br /> <%<br /> start = LastComma+2 <br /> LastComma = Instr(start,newparam,",",vbTextCompare)<br /> tempstr = ""<br /> %> <br /> <%Wend%> <br /><br /> <%tempstr = Right(newparam,len(newparam)-start+1)%> <br /> <%=tempstr%> <br /> <%Else%> <br /> <%tempstr = newparam%> <br /> <%=tempstr%><br /> <%End IF%><br />------------<br />steve at 4/30/2002 9:08:38 PM<br /><br />once you select all the values inside the multiple list box, this is a comma-delimited valueset. you'd have to loop through to parse tha values.<br /><br /><br />------------<br />bonner at 4/24/2002 2:50:54 PM<br /><br />I have a dropdown list that a user can select multiple values from. I want to pass this information to a Store Procedure in SQL and get back a result set. How would I go about doing it? Thanks for any help you can give.

Reply With Quote
  #4  
Old May 10th, 2002, 06:00 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : aztec (aztec@wanadoo)</b></i><br />Could you explain a little further:<br />-> what does your sproc do with the values? (or what should it do?)<br />-> could you show us some code of your sproc?<br /><br />If you mean that the response.writes you do here are returning only one result, that's because you place them outside your loop so they'll only show the last value.<br /><br />------------<br />bonner at 5/1/2002 11:41:00 AM<br /><br />Thanks. I did parse out the values. See the code below. What's happening now is that it is returning only the result set of the last value. I must be doing something wrong. Any help you can give would be great.<br /><br /><%newparam = request("paramname")<br /> start = 1<br /> LastComma=Instr(start,newparam,",",vbTextCompare)<br />%><br /><br /> <% If ( LastComma > 0 ) Then %> <br /> <%While ( LastComma > 0 )%><br /> <%tempstr = Mid(newparam,start,LastComma-start)%><br /> <%=tempstr%><BR> <br /> <%<br /> start = LastComma+2 <br /> LastComma = Instr(start,newparam,",",vbTextCompare)<br /> tempstr = ""<br /> %> <br /> <%Wend%> <br /><br /> <%tempstr = Right(newparam,len(newparam)-start+1)%> <br /> <%=tempstr%> <br /> <%Else%> <br /> <%tempstr = newparam%> <br /> <%=tempstr%><br /> <%End IF%><br />------------<br />steve at 4/30/2002 9:08:38 PM<br /><br />once you select all the values inside the multiple list box, this is a comma-delimited valueset. you'd have to loop through to parse tha values.<br /><br /><br />------------<br />bonner at 4/24/2002 2:50:54 PM<br /><br />I have a dropdown list that a user can select multiple values from. I want to pass this information to a Store Procedure in SQL and get back a result set. How would I go about doing it? Thanks for any help you can give.

Reply With Quote
  #5  
Old May 13th, 2002, 04:05 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Bonner (bonner1975@yahoo.com)</b></i><br />Based off of what the user selects from the dropdown list, the information gets passed to the following:<br /><br />@newparam varchar(3)<br />Select * From Employee Where center IN @newparam<br /><br />------------<br />aztec at 5/10/2002 4:00:40 PM<br /><br />Could you explain a little further:<br />-> what does your sproc do with the values? (or what should it do?)<br />-> could you show us some code of your sproc?<br /><br />If you mean that the response.writes you do here are returning only one result, that's because you place them outside your loop so they'll only show the last value.<br /><br />------------<br />bonner at 5/1/2002 11:41:00 AM<br /><br />Thanks. I did parse out the values. See the code below. What's happening now is that it is returning only the result set of the last value. I must be doing something wrong. Any help you can give would be great.<br /><br /><%newparam = request("paramname")<br /> start = 1<br /> LastComma=Instr(start,newparam,",",vbTextCompare)<br />%><br /><br /> <% If ( LastComma > 0 ) Then %> <br /> <%While ( LastComma > 0 )%><br /> <%tempstr = Mid(newparam,start,LastComma-start)%><br /> <%=tempstr%><BR> <br /> <%<br /> start = LastComma+2 <br /> LastComma = Instr(start,newparam,",",vbTextCompare)<br /> tempstr = ""<br /> %> <br /> <%Wend%> <br /><br /> <%tempstr = Right(newparam,len(newparam)-start+1)%> <br /> <%=tempstr%> <br /> <%Else%> <br /> <%tempstr = newparam%> <br /> <%=tempstr%><br /> <%End IF%><br />------------<br />steve at 4/30/2002 9:08:38 PM<br /><br />once you select all the values inside the multiple list box, this is a comma-delimited valueset. you'd have to loop through to parse tha values.<br /><br /><br />------------<br />bonner at 4/24/2002 2:50:54 PM<br /><br />I have a dropdown list that a user can select multiple values from. I want to pass this information to a Store Procedure in SQL and get back a result set. How would I go about doing it? Thanks for any help you can give.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > passing multiple values


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway