How to return data like MSFT SQL Server Management Studio

C

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
 
W

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.
__________________________________
 
G

Guest

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!
***************************
 

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

Top