|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to return data like MSFT SQL Server Management StudioHi,
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 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. -- Show quote____________________________________ 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. __________________________________ "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 > > 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. -- Show quoteGregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "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 > > > |
|||||||||||||||||||||||