Randy, I have the same problem. I'm using a private instance of the default database, instantiated as follows:
private Database _db = EnterpriseLibraryContainer.Current.GetInstance<Database>();
Then I'll call a command similar to this:
string sql = "usp_SomeStoredProcedure";
DbCommand cmd = _db.GetStoredProcCommand(sql);
_db.AddInParameter(cmd, "CatID", Db.Type.String, "234");
cmd.CommandTimeout = 20;
DataSet ds = _db.ExecuteDataSet(cmd);
This query will run and fill my dataset, even if it takes four minutes or so. It won't trigger a timeout exception if it runs longer than the 20 seconds I specified. But sometimes I will get a SQLException timeout if it runs about five minutes
or so--and I'm trying to figure out the issue.
I've tried creating a local instance of the current database and running similar commands on that, thinking perhaps the private instance was the problem, but that didn't seem to help:
trial_db = EnterpriseLibraryContainer.Current.GetInstance<Database>(); (and then I run the commands above on trial_db instead of _db).
Any thoughts? What am I missing here?