Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 query from listbox .asp application

Author  Topic 

alxtech
Yak Posting Veteran

66 Posts

Posted - 2006-01-25 : 14:52:59
I have a problem selecting fields from a table where fields are equal to user input from a listbox. example

listbox of zip codes:

33023
22300
39844
29339
23883
38228

user wants to retreive highlight zip codes from database.
connection working perfect.
Thank you for your help.




SamC
White Water Yakist

3467 Posts

Posted - 2006-01-25 : 15:04:07
String the selected zip codes into a CSV parameter, e.g.,

strSelectedZipCodes = "22300,29339,38288" ' You'll do this in a loop somehow, then...

Call the ADO passing strSelectedZipCodes to a stored procedure that expects a CSV string...

Then read this thread...
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=25830
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-27 : 05:20:43
Also refer
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=60912

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -