Re: Multiple (unrelated) declarative parameters



"Tastic" <brett.smith@xxxxxxxxxx> wrote in message
news:1171657736.096459.13340@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, I am working on a search & filter form using about 6 different
dropdown boxes, and possibly more to come.

Here is what I am trying to acheive; if the user does not specfiy any
choice in a ddb then then that particular filter is not applied
....
My actual question: am I going to have to sit here and manually go
through every possible combination of parameters used? (this would be
exceptionally time consuming not to mention messy)

or is there something I can do in my BLL to add or remove parameters
depending on selections

What if your query was something like this:

SELECT * FROM MY_TABLE
WHERE (
((@DDL1_PRESENT AND DDL1 = @DDL1) OR (NOT @DDL1_PRESENT)) AND
((@DDL2_PRESENT AND DDL2 = @DDL2) OR (NOT @DDL2_PRESENT)) AND ...
)

Then your only trick would be to supply the *_PRESENT parameters by testing
to see if ddl's have the "Please Select" item selected.

John


.