Jump to content
Sign in to follow this  
abeetha.m

asp.net help

Recommended Posts

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???

Share this post


Link to post
Share on other sites

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.}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...