I have a stored procedure with a rather complicated select query. Sometimes this query can return several thousand rows.

I want to be able to select a range of rows by number, such as rows numbered 1200 to 1300. I want to pass these two numbers as parameters. Or I could pass the first row number and the number of rows to return.

I'm using SQL 2000.

Another approach is to return all wows to the ASP.Net application and store the rows somewhere. But where do they get stored? I don't want to send several thousand rows of data to the client machine.