I am having timeout issues when dealing with long sql queries, the Dataset which timesout for long queries is :
static public DataSet Getxxxx(Guid xxxx)
{
DataSet ds = SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, "GetAllxx", new SqlParameter("@productxx", productxx));
return ds;
}
Where can i set timeout , I am using Microsoft application block version 2.0.
The Data Access Application Block
SqlHelper
has been phased out in favour of 'Database', so you'll need to explicitly create aDbCommand
and pass it through toDatabase.ExecuteDataSet
. You can then set theCommandTimeout
property, to override the default of 30 seconds. e.g. this sets the timeout to 200 seconds: