May be a dirty question. Is there a simpler way in C# code to get resultset of a SQL query similar to that of SSMS output window
Input should be accepting a SQL Statement as shown below
select * from table_1;
Ouput should be a text like that shown on SSMS output window.
Column1 Colum2
1 2
2 3
If you would rather have a console application than deal with a WinForms or ASP.Net WebForms application, this tutorial will show you how to do it, step by step. You really need to get all the details there, but this will give you an idea of how it’s done in a key method: