473,394 Members | 1,869 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,394 software developers and data experts.

Data filtering

Hi ASP.Net experts

I have a archived SQL Server 2000 database table with about 300,000 records,
and need to display filtered data on a ASP.Net 2 web page.

Basic filtering needs to be done on id, name and DOB fields, however,
advanced filtering could include between 1 and 10 different checkboxes being
check or unchecked.

What would be the best approach to this. Are there any examples I could view?

Many thanks
Apr 11 '08 #1
2 1289
"jez123456" <je*******@discussions.microsoft.comwrote in message
news:0D**********************************@microsof t.com...
I have a archived SQL Server 2000 database table with about 300,000
records,
and need to display filtered data on a ASP.Net 2 web page.

Basic filtering needs to be done on id, name and DOB fields, however,
advanced filtering could include between 1 and 10 different checkboxes
being
check or unchecked.

What would be the best approach to this.
I would recommend using a stored procedure for this where the ID, name and
DOB fields are non-nullable (i.e. required) parameters and the other fields
which relate to the checkboxes are nullable (i.e. optional) parameters.

How you write the stored procedure will largely depend on the logical use of
the checkboxes.

I.e. if a checkbox is checked, does that mean you want to return only those
records where the field that the checkbox relates to is True and if the
checkbox is unchecked return only those record where the field that the
checkbox relates to is False or, if the checkbox is unchecked, does that
mean that you want to completely ignore the field that the checkbox relates
to...? If the latter, then you may be forced to build up the query
dynamically in the stored procedure and execute it with the sp_executesql
function:

http://www.google.co.uk/search?sourc...p%5fexecutesql
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Apr 11 '08 #2
"jez123456" <je*******@discussions.microsoft.comwrote in message
news:0D**********************************@microsof t.com...
I have a archived SQL Server 2000 database table with about 300,000
records,
and need to display filtered data on a ASP.Net 2 web page.

Basic filtering needs to be done on id, name and DOB fields, however,
advanced filtering could include between 1 and 10 different checkboxes
being
check or unchecked.

What would be the best approach to this.
I would recommend using a stored procedure for this where the ID, name and
DOB fields are non-nullable (i.e. required) parameters and the other fields
which relate to the checkboxes are nullable (i.e. optional) parameters.

How you write the stored procedure will largely depend on the logical use of
the checkboxes.

I.e. if a checkbox is checked, does that mean you want to return only those
records where the field that the checkbox relates to is True and if the
checkbox is unchecked return only those record where the field that the
checkbox relates to is False or, if the checkbox is unchecked, does that
mean that you want to completely ignore the field that the checkbox relates
to...? If the latter, then you may be forced to build up the query
dynamically in the stored procedure and execute it with the sp_executesql
function:

http://www.google.co.uk/search?sourc...p%5fexecutesql
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #3

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

Similar topics

2
by: Jim Dabell | last post by:
I'm in the middle of writing a small app for Linux that needs to create directories that take their names from untrusted data. If possible, I'd like to preserve special characters rather than...
17
by: Dan Koster | last post by:
I have three weeks of history for all user accounts stored in a DataSet (dsAccountsHistory). I want to be able to narrow that data down to one specific user, at runtime, without having to make...
2
by: ecoulson123 | last post by:
I am using Access 2000. I am trying to summarize numeric data from a large database. The problem is that I need the summarization functions to ignore "junk" data, defined in a couple ways. ...
2
by: ChrisB | last post by:
Hello: I am writing an application using C# that needs to support several queries that limit the number of returned records through the use of filtering and was hoping to get some opinions on...
1
by: Patrick | last post by:
Hi all, New to .NET, I'm working on an Winforms client application using VS 2005 beta2. My needs considering data storage are the followings: (1) Small files (0 < length < 10 mb), containing...
1
by: panche | last post by:
I'm developing a fairly simple user control that has two textboxes for date/time entry (a from date/time and a to date/time). One of my requirements is that there should be no button that sets...
3
by: David Barker | last post by:
I wish knowledge as to creat a Bibilical data index i.e. Genesis to Revelations not alphabetical! Can this be done using "Advance filtering"? and How?... I wish to be able to index a text that I'm...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
3
by: Shawn Ramirez | last post by:
As with most web applications speed is a huge deal to me in my applications. My customers don't really care if my app is a true 3 tier application or not, they just want it to be faster then it was...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.