Home All Groups Group Topic Archive Search About

How to return data like MSFT SQL Server Management Studio

Author
22 Mar 2006 4:35 PM
Carlos Cruz
Hi,

Is there a way of getting the result of a query like SQL Server Management
Studio ? Row by row with the possibility to stop the query?

Thanks in advance
CC

Author
22 Mar 2006 4:42 PM
William (Bill) Vaughn
Sure. Create a SqlDataReader and each row of the rowset is returned
on-at-a-time. Remember that SSMS is a development tool, not an end-user
application so holding a DataReader open does not matter... much.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

Show quote
"Carlos Cruz" <carlos.msm.c***@gmail.com> wrote in message
news:%239e866cTGHA.776@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> Is there a way of getting the result of a query like SQL Server Management
> Studio ? Row by row with the possibility to stop the query?
>
> Thanks in advance
> CC
>
>
Author
22 Mar 2006 6:29 PM
Cowboy (Gregory A. Beamer) - MVP
It uses a tabular data stream. In .NET, this would be a DataReader. It is run
on a thread separate from the UI, so the thread can be aborted by hitting
cancel while the stream is in process. If you want to do the same, spawn a
thread and start streaming data from a DataReader.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************


Show quote
"Carlos Cruz" wrote:

> Hi,
>
> Is there a way of getting the result of a query like SQL Server Management
> Studio ? Row by row with the possibility to stop the query?
>
> Thanks in advance
> CC
>
>
>

AddThis Social Bookmark Button