Increase DAAB time out

G

Guest

I am using an old version of the DAAB. I need to set the command timeout
property.
This is my code.

SqlConnection myConnection = new SqlConnection(_ConnectionString);

DataSet ds = SqlHelper.ExecuteDataset(myConnection,sp, spParams);

This works fine for quick queries but of course will timeout with anything
over 30 seconds. I tried to find a way to increase the command timeout but
forthe 9 overload methods of SqlHelper.ExecuteDataset but I do not see a way
to pass this method a command object. How do you increase the command timeout
for executing a stored procedures with SqlHelper.ExecuteDataset.
 
G

Guest

The V2 SqlHelper class does not have a ComandTimeout setting. I'd recommend
you add a static int field to the class, which can be set prior to making
any method calls, and then this value can be checked inside each method and
the Command.Timeout changed appropriately.

This is fairly common, they just didn't think to put it in.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top