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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SEARCH! PLEASE HELP!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi All!
I'm new to asp and I have a question..

I have table in SQl 7.0 and and with ASP I made a connection with this table.. In internet Explore I created drop down box and in this drop down box there is an information (records) from this table..
When I'm choosing on of them it goes to a linked document that i specifyed..

My question how to create a field where I can write a Company Name (Companies names are in my table) and then for example in this box I'm typing "a" so all records that their first letter is "a" will come up in this drop down box. Than if I will continue "ab" so all records with "ab" in beginning will come up...
It's very similar to access, sql help where you are searcing for a command or something like that..

ANY HELP APPRECIATED!!! THANK YOU!
P.S. In this drop down box I have 10000 records...
 
If you want to do this in real-time, without reloading the page with every key press, you will have to program that in Javascript.

First you will need to load all the entries into a variable and then capture each key press in an event handler and parse out the entries in the drop down. This ofcourse has big overhead on the client machine.

I'm not familiar with any other way to do this.
 
tarzan123_us,

I believe what you are trying to do sounds good but you need to think of what is happening before you do this.
You say you have 10,000 records. Each time you type a new letter, the client will have to make a trip to the server. For instance, type "a" will bring 10,000 records, typing "ab" will bring down another, say 8,000 records, typing "abx" will bring down say another subset 5000 records and so on. And this would happen for each user on your web page. The effect would probably slow your server to a crawl not to mention bandwidth.

You are better off trying to find all strings that look like "abx"

strSQL = "SELECT * FROM mytable WHERE myValue LIKE 'abxx%'

Cheers,
fengshui_1998


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top