Getting sqlcmd output in GridView

I am designing an ASP.NET website that will run sqlcmd, get some output, and put it on a grid on the screen.

I was wondering if there is a method to read the query results from sqlcmd into some format that I can work with, XML, DataSet, etc.

Is there a friendly switch in sqlcmd that will output it in a good format or will I have to parse it myself?

0


source to share


1 answer


You can use the SqlCommand.ExecuteXmlReader () function. It will return an object of type XmlReader.
You can get a little help here about ExecuteXmlReader ().



+1


source







All Articles