When I execute 3 line script(or more) (Example: I UPDATE, II DELETE, III SELECT), SSMS gives me 3 Message(s) and 1 Result(s):
- I UPDATE -> x row(s) affected
- II DELETE-> x row(s) affected
III SELECT -> x row(s) affected
III SELECT -> grid view
How can I make it my own? using C#.
I'm creating:
SqlConnection cn = new SqlConnection("blabla");
SqlCommand cmd = new SqlCommand("my script", cn);
now I need execute and get all type of result
- row(s) affected
- row(s) affected
- DataTable (or DataSet)