Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 30th, 2007, 12:22 AM
Registered User
 
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajneesh
Default Database driven drop down

Hi,

I have one select box to be displayed 10 times and the value of records is 1175 so it run 11750 loop in asp to display 10 times.

Please let me know any other good idea to display for faster results.

Regards
Rajneesh

Rajneesh
 
Old May 2nd, 2007, 10:34 AM
Registered User
 
Join Date: May 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Banksie
Default

I'm a bit confused about what you are trying to achieve, can you explain a bit more and i will see if i can help!!

Banksie
 
Old May 2nd, 2007, 06:15 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Alot of thought needs to be put into how to code a page. IMO coding it is the complicated part however how it should be put together is more important. Is the select box you speak of being displayed 10 times on the same page? I cant imagine why you would do this, Im sure there is a good reason. If you need the data, you need the data.

I would reccomend the good old practice of placing your recordset (RS) into an array, closing and getting rid of your connection, then use the array where you need it.

Personally - I would get annoyed with a select list containing thousands of records however do realize there is a need for this on occasion.

Wind is your friend
Matt
 
Old May 5th, 2007, 01:39 AM
Authorized User
 
Join Date: May 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I agree with Mat41. Why would you require a page with same dropdown appearing 10 times?

The other approach you could go for is...
Write ASP code to fetch data from the database and populate the first dropdown. Render the HTML to the browser and on OnLoad of the page write a JavaScript function to copy List Box data/values from first dropdown to the other 9 dropdowns in the page. This will be slightly faster for the person browsing the site.

Akash - The Sky






Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Database Driven Top Menu Bar with CSS Lucy CSS Cascading Style Sheets 1 March 30th, 2006 10:14 PM
Database driven Dynamic radio buttons :URGENT srichary BOOK: Beginning ASP 3.0 10 November 2nd, 2004 04:52 PM
Database Driven Website w/ META tags Dan Jallits PHP How-To 2 June 16th, 2003 11:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.