473,378 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Multiple (unrelated) declarative parameters

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... I
am probably not making a lot of sense here...

dd1 = Business Type (accountant/lawyer/restaurant etc)
dd2 = Business Category (Service / Price / Product Quality etc) ie
what is more important to the user
dd3 = product type(for accountant this would be type of accountant,
for a restaurant it would be type of cuisine)
dd4 = suburb
dd5 = City
dd 6 = Country

in order to select suburb the user will need to first select City,and
in turn first select country
this part is fine, I know how to set this up

but if the usr only selects values from say dd1 and dd3 and dd6 then
the other parameters should be removed but leave the ability for the
usr to then turn around and filter more

I have done this with one ddb through objectdatasource the DAL has two
select queries one with the parameter and one with out. The BLL simply
states if parameter >0 call (select without)
else call (select with)
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

Feb 16 '07 #1
2 1204
"Tastic" <br*********@ihug.co.nzwrote in message
news:11*********************@k78g2000cwa.googlegro ups.com...
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
Feb 16 '07 #2
On Feb 17, 10:13 am, "John Saunders" <john.saunders at trizetto.com>
wrote:
"Tastic" <brett.sm...@ihug.co.nzwrote in message

news:11*********************@k78g2000cwa.googlegro ups.com...
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
Thanks very much I'll see how it goes

Feb 16 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: bmccollum | last post by:
I have written a trigger that's supposed to go out and delete corresponding records from multiple tables once I delete a specific record from a table called tblAdmissions. This does not work and...
3
by: Mark | last post by:
Hi everyone, I just need a bit of advice as to where to start tackling a problem, if thats possible - thanks very much. I need a single stored procedure to make several inserts into my msde...
2
by: Christoph Wienands | last post by:
Hello everybody, a while ago on one of the "big" DotNet websites (like GotDotNet) I stumbled across a description of a tool that enables developers to work with features like "Declarative...
4
by: Xia Wei | last post by:
Hi group, I'm trying to use CAS in my project these days. And I find a problem, for example: static void Exec() {} Then the caller of this method should be a member of role "Xxx". If I...
7
by: Matthias S. | last post by:
Hi, here is what I'm trying to do: I have a virtual directory called "WebApp". Under this one I've got 2 physical directories called "Customers" and "Admins". I implemented Forms-based...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
4
by: | last post by:
I'm finishing an .ascx control that takes custom properties. I've made a generalized administrative form that can be made specific by calling the user control with a bunch of parameters (e.g. ...
1
by: Steven T. Hatton | last post by:
All of the following terms are used in some way to describe where and how a name is relevant to a particular location in a program: visible, declarative region, scope, potential scope, valid,...
0
by: EricLondaits | last post by:
Hi, I have an ASP.NET page with a ListBox that is data bound to a table with a single field (it holds a list of valid IDs). The page also has a textBox into which you can add new valid IDs, one...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.