471,058 Members | 973 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,058 software developers and data experts.

Increase DAAB time out

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.

Jul 18 '06 #1
1 6239
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Phil396" wrote:
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.
Jul 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by veera sekhar kota | last post: by
reply views Thread by veera sekhar kota | last post: by
reply views Thread by veera sekhar kota | last post: by
7 posts views Thread by Alec MacLean | last post: by
5 posts views Thread by Dick | last post: by
5 posts views Thread by | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.