abeetha.m Posted April 2, 2006 Share Posted April 2, 2006 i wrote some code here,in this code stored procedure is returning a datareader objectSqlConnection sqlConnection1 = new SqlConnection("Your Connection String");SqlCommand cmd = new SqlCommand();SqlDataReader reader;cmd.CommandText = "StoredProcedureName";cmd.CommandType = CommandType.StoredProcedure;cmd.Connection = sqlConnection1;sqlConnection1.Open();reader = cmd.ExecuteReader();sqlConnection1.Close();now::: in the same is there any method which returns dataset??? Link to comment Share on other sites More sharing options...
Bhushan Posted April 3, 2006 Share Posted April 3, 2006 Hi,Instead of a DataReader, make use of DataSet object.You can have a function which will return a dataset.example: System.Data.DataSet function_name(){//your code herereturn //your dataset object.} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now