468,471 Members | 1,783 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,471 developers. It's quick & easy.

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 6168
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 NPC403 | last post: by
1 post views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.