It's a while since I did this, but as I recall, the steps are:
* Create your stored procedure
* Instantiate a command object (e.g. a sqlCommand instance if you're using
SQL Server)
* Assign your stored procedure's name to the command object's CommandText
property
* Set the command object's CommandType to
System.Data.CommandType.StoredProcedure
* Create a connection object
* Assign the connection object to the command's Connection property
* Create any parameter objects you might need and assign them to the
command's Parameters collection using .Add
* Create a DataAdapter object (e.g. a SqlDataAdapter instance if you're
using SQL Server), passing your command object and connection object as
parameters.
* Create a DataSet object
* Call Fill() on your DataAdapter object, passing in your DataSet object as
a parameter.
Your DataSet object now contains your results, which you can access in the
normal way.
HTH
Peter
"Robert Bravery" <da****@amataz.co.zawrote in message
news:O1**************@TK2MSFTNGP03.phx.gbl...
HI all,
I'm relatively new to this.
How can I get the results of a SP (returns a recordset) into a dataset
Thanks
Robert