Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Return data while stored procedure is running

Author  Topic 

nigel
Starting Member

3 Posts

Posted - 2004-08-03 : 09:43:26
I have a stored procedure that takes several seconds to run.

Using ASP.NET is it possible to call a stored procedure and start receiveing and processing the returned data while the SP is still running. (eg start loading and displaying the returned data into a datagrid while the SP is still getting the data)?

JasonGoff
Posting Yak Master

158 Posts

Posted - 2004-08-03 : 09:46:02
How many rows is your SP returning to take several seconds to run ? Post your SP code here. Don't know enough about .Net to know whether or not what you ask is possible, but there may be something that can be done to make the sp quicker !
Go to Top of Page

nigel
Starting Member

3 Posts

Posted - 2004-08-03 : 12:15:48
It's more of a hypothetical question. The SP isn't one I can change - it's part of a legacy system. I think the answer will be more on the ASP.NET side than the SP side. But does anyone have any experience of this?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-03 : 12:21:57
i don't think you can do it in the way you want to, because that would mean you would have to somehow get inside the DataAdapter.Fill() method. you could probably write it from "scratch" but that's a waste of time.
Paging is the thing to think about here. either in the sproc, or in the datagrid. but don't return 100.000 rows at once into the dataset. if that's what you want to do, you need a better user interface.

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

nigel
Starting Member

3 Posts

Posted - 2004-08-04 : 04:45:36
Thanks, I can't see how it can be done, but I know there are some clever people out there. I think paging is the way forward.
Go to Top of Page
   

- Advertisement -