I am new to .NET 3/3.5 (C#) Programming. It may be simple for you but not for me.
I have a task to executing stored procedure from c# application, using command and it returns 3 different data tables proc is already done in sql 2005,but I want to know how to get data in c#. exactly need c# code how to handle data tables form the result set,if result set returns more than one datatable.
Thanks
I am new to .NET 3/3.5 (C#) Programming. It may be simple for you
Share
You can use the SqlDataAdapter.Fill() method to fill a DataSet. This way you can access the multiple result tables using this –
Or, you can use a SqlDataReader (which is faster if you want to process your data in a forward-only fashion). For reading the records of the first result set, you can iterate a
whileloop and call the SqlDataReader.Read() method.For fetching the next result set, you call the SqlDataReader.NextResult() method.