Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieve multiple records. 1

Status
Not open for further replies.

GoldPearl

Programmer
Joined
Aug 9, 2005
Messages
64
just started that thread in asp forum..some1 asked me better post it here. so here we r!

Hello

Can anybody tell me how to retrieve multiple records from a table based on the same criteria and display it as selected in a listbox?

For eg from a combo, i select a type of beverage(lstbev) and when i click the view button, i have all the characteristics for that beverage listed in a multiple selection listbox (lstchar).

Any code snippets would be welcome.(lang used asp + db:sql server 2k)

Regards,
Gold Pearl

 
If you want the code to do the database retrieve, then this is the wrong forum to be asking in.

If you want to know how to populate the data into two listboxes once you have it, then this is the right place.

What part are you actually looking to achieve? It looks like the thread in the ASP forum had an answer, anyway.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
well i want to do both...

first retrieve the multiple data from the db and second have the relevant characteristics(retrieved from the db) selected in a listbox where there are many other characteristics.
 
There are several ways of doing this. You could have all the information delivered to the page, and then use JavaScript to populate the second two list boxes depending on what was selected from the first. This has been discussed many times recently, so you should be able to find the answer with a quick search.

A better way (better, depending on your target browser audience) of doing this would be to submit the form after initial selection, and have the DB return the information needed for that drink. This could then be populated using server-side code, requiring no JavaScript at all.

As some people surf with JS disabled, I advise you stick with server-side code to do this.

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
ok thks for the tips.

Regards,
Gold Pearl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top