I am fetching data from SQL through stored procedure.
In my SQL query window it takes 43 seconds to execute.
But while I am executing same stored procedure through c# I am unable to get response in 5 min.
I am using SqlDataAdapter
using (SqlDataAdapter da = new SqlDataAdapter(cmd))
{
DataSet ds = new DataSet();
// Fill the DataSet using default values for DataTable names, etc
da.Fill(ds);
// Detach the SqlParameters from the command object, so they can be used again
cmd.Parameters.Clear();
if (mustCloseConnection)
connection.Close();
// Return the dataset
return ds;
}
Please help me.
Your DateTimePicker is under this format : dd/MM/yyyy.
Standard SQL dates are under this format : MM/dd/yyyy.
Use this for your SP: