New to DRW..Help? (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


A1234 -> New to DRW..Help? (10/7/2004 19:55:54)

I got as far as creating 2 drop down boxes for search criteria. One is to search by "state", the other is to search by "endorsement". It seems to be performing ok, but the problem is this:
Check out my page at www.nadras.com/searchtemp.asp. The first drop down box contains the states. However, it only shows the states that are currently in the database, as opposed to having a list of states to choose from. As you can see, in the state box there are 2 "AL" (alabama). This is because there are 2 people in the database that live in Alabama. Eventually i'm going to have hundreds of people from Alabama and don't want hundreds of "AL"'s to show up in that drop down box. The same goes with the second box "endorsements". There are 2 empty spaces in that drop down box because there are 2 users in the database with no endorsements. I want to be able to choose from a list of endorsements, not from what the users have selected in the database. Does anyone have a fix for this? [&:]




Spooky -> RE: New to DRW..Help? (10/7/2004 20:10:53)

Hey there !
That record looks familiar [;)]

Are you using the DRW to produce a drop down list? If so - you might like to use "DISTINCT" in your SQL string

"SELECT DISTINCT x_State from Users"




A1234 -> RE: New to DRW..Help? (10/7/2004 20:49:26)

Howdy stranger! I'm always up for learnin something new. The query string I have right now is
"fp_sQry="SELECT * FROM Users"
I tried to change it to Distinct but when I hit save it converted bck to this...? [:(]




A1234 -> RE: New to DRW..Help? (10/7/2004 21:54:22)

Oh!!! I got it now...was putting it in the wrong place...persistence pays off again. Thanks! [8D]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.03125