Are you using ADO or ADO.Net ? Both have the capability to return multiple recordsets from a stored procedure. In Ado, if a stored procedure has multiple Selects in it, you can access the second, and subsequent Resultsets (ADO RecordSets
) in your client code by calling Recordset.NextRecordSet
.
In ADO.Net, When a Stored proc has multiple Selects, ADO.Net will put the results of each Select into a DataTable
object, and put each DataTable
into the Tables
collection of the DataSet
object which returned by the ADO.Net command.Execute()
method.