ObjectDataSource, SqlDataSource, DataSet

O

osh

Fellow ASP.net'ers...

I am working on a solution that needs to perform a search (search
criteria can be as little as 1 and as high as 20 fields) through an
average of 25,000 records and return results in a GridView. I only want
to return 150 results total, and page through them 10 results at a time
- but I also need to grab a count from the MSSQL server as to how many
TOTAL records were found. So maybe 4,500 records were found that met
the users' search criteria, but I only want to show the first 150, but
let the user know there were 4,500.

The GridView will need to page through these records, 10 at a time.
From what I understand with this scenario and the DataSet, is that each
time the user clicks to go to a different page, the MSSQL server will
be re-queried and the DataSet re-filled each time, even though I'm only
retrieving 10 records for display. Caching 25,000+ records is not an
option due to the strain that this memory would take on the web server.
I've looked at the ObjectDataSource and custom pagination, but how do I
pass all the search parameters into this ObjectDataSource? Is the
ObjectDataSource even the most efficient way to do this? Since I have
to refer to a file in the App_Code folder with this method, I am
confused as to how I write the code in the .CS page in the App_Code
folder. Is there any type of comprehensive resource out there that
explains how to write custom classes and how to pass parameters into
it?

Any help anyone can give would be greatly appreciated. Thanks for your
time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top