I am coming across this problem that whenever I am trying to retrieve the data in a dataset through SQLDataAdapter and Dataset, it is taking around 10 min to get the data on the localhost. And when I am running the same code on the live server it doesnot take time at all and I get the data in few seconds only.
My dataset Contains three tables, first one containing 25rows and each row containing 12 columns. Second and Third Table contains 25 rows and 2 columns.
My code looks like this.
DataSet ds = new DataSet(); SqlConnection connect; connect=connecttodatabase() /* connecttodatabase is a method used to connect to the database by setting the connection string. */ SqlCommand command = new SqlCommand("GetAssignment", connect); command.CommandType = CommandType.StoredProcedure; command.Parameters.ADD("@assignmentId", SqlDbType.BigInt).Value = assignmentId; command.CommandTimeout = 0; SqlDataAdapter sda = new SqlDataAdapter(command); sda.Fill(ds, " "); RETURN ds;
Can anyone tell me the solution to this.
Thanks in advance :)