returning dataset from stored procedure

  • Thread starter Thread starter Mike P
  • Start date Start date
M

Mike P

How do you return a dataset from a stored procedure so that you can
iterate through the rows returned?



Thanks in advance,

Mike
 
Mike,

You don't. The stored procedure can return a result set (basically, a
select off of a table, or something of that nature).

Once you have the stored procedure, you can call it by using a
SqlCommand object which makes the call. The SqlCommand object will return a
SqlDataReader.

Or, you can attach the same SqlCommand object to the SelectCommand
property of a SqlDataAdapter, which will then populate a DataSet for you
when you call the Fill method.

Hope this helps.
 
Back
Top