Returning a large amount of records

M

mehdi_mousavi

Hi folks,

Consider an ASP.NET web service that's supposed to do our business
logic, as well as persisintg data in a given database layer. The web
service in question is supposed to return million of thousands of
records as a named-dataset. By named-dataset I mean a dataset that has
got a known schema. For example, a collection of FirstName, LastName,
Phone Numbers and ... of peoples who work in the country. The
presentation layer is also supposed to filter this information based on
a given criteria, indicated in an HTML form by the end-user. I would
love to know what's the official way of developing such a service.
i.e.,

a) filtering a large amount of records,
b) returning back the large amount of records to the client, chunk by
chunk.

I've for example developed this service as follows:

[WebMethod(EnableSession=true)]
MyNamedDataSet FilterAndQueryLargeData(MyNamedFilterDataSet)
{
//If this is the first time the client calls this method, we need to
//get and filter the required information from the DataLayer
//based on MyNamedFilterDataSet.

//otherwise, prepare an instance of MyNamedDataSet filled by the
//required records, bookmark the current position (in someway),
//and return the dataset.
}


I would like, however, to understand what's the official way of
developing such a service.

Any help would be highly appreciated,
Cheers,
M.Mousavi
 
P

Peter Morris [Droopy eyes software]

You could pass the filter on to the webservice and/or add the following
parameters

int rowsPerPage, int pageNumber
 
P

Peter Morris [Droopy eyes software]

Do you mean this is the official way to go?

"There is no one true path".

These are merely the ways I would consider. If there is a recommended way
then it is simply recommended by someone other than myself :) You would
probably find it on http://msdn.microsoft.com/practises somewhere. Please
let me know if you find something!


Pete
 

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

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,814
Latest member
SpicetreeDigital

Latest Threads

Top