Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql Command Timeout
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Sql Command Timeout
Environment versions
Environment:
C# 1.1
OS:
Windows XP
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01043997
Message ID:
01043997
Views:
77
I recently increased the size of my test database and now I am encoutering a SQL timeout error. The default command timeout is 30 seconds and I thought I had increased it, but it seems like I am missing something. Here is what I have done:

1. In my aBusiness (subclass of mmBusinessObject), I have added:

protected override OakLeaf.MM.Main.Data.mmDataAccessBase CreateDataAccessObject(string dataAccessClassName)
{
return base.CreateDataAccessObject(dataAccessClassName);
}

2. In Factory.cs, I added:

public override OakLeaf.MM.Main.Data.mmDataAccessSql CreateDataAccessSql()
{
return new aDataAccessSql();
}

3. I created the class aDataAccessSql (subclass of mmDataAccessSql) and added:

public override IDbCommand CreateCommand(string cmdText)
{
// call the base class method
IDbCommand cmd = base.CreateCommand(cmdText);

// set the command timeout
cmd.CommandTimeout = 600; // 10 minutes

return cmd;
}

The business object (subclass of aBusiness) is calling the GetDataSet() method. If I set a break point in the base business object FillDataSet() method, the CommandTimeout is still set to 30.

If I set a break point in the CreateCommand() method of aDataAccessSql, it never fires. Any ideas or suggestions are greatly appreciated.

Kind Regards,

Mat
Matthew Kennedy
Decision Support Technology Inc.

"I try to take one day at a time, but sometimes several days attack me all at once." ~ Ashleigh Brilliant

New Jersey Dot Net User Group
Next
Reply
Map
View

Click here to load this message in the networking platform