I can change the timeout for an SqlCommand using cmd.CommandTimeout, but does anyone know how to change the timeout for a SqlDataAdapter that is about to fill a DataSet? Thanks
SOLUTION: ARRGH! FINALLY! THIS IS NOT ANOTHER "CONNECTION TIMEOUT" RESPONSE IF YOU ARE HAVE A LARGE QUERY AND GETTING A TIMEOUT ERROR USING A DATASET READ BELOW. Timeout error on a DataSet? Not using SqlCommand because you're using a SQLDataAdapter? Have no
fear! See the second line below:
SqlDataAdapter dadData = new SqlDataAdapter(strSQLString, conUS);
dadData.SelectCommand.CommandTimeout=120;
For curiosity, please reply to this post if this has helped you.
jmiller4
Participant
782 Points
157 Posts
How do you change a SqlDataAdapter .CommandTimeout?
Oct 28, 2003 08:45 PM|LINK
daibatron
Participant
1090 Points
218 Posts
Re: How do you change a SqlDataAdapter .CommandTimeout?
Oct 28, 2003 10:17 PM|LINK
jmiller4
Participant
782 Points
157 Posts
Re: How do you change a SqlDataAdapter .CommandTimeout?
Nov 10, 2003 06:17 PM|LINK
jmiller4
Participant
782 Points
157 Posts
Re: How do you change a SqlDataAdapter .CommandTimeout?
Nov 11, 2003 08:14 PM|LINK
cgoodyear
Member
80 Points
16 Posts
Re: How do you change a SqlDataAdapter .CommandTimeout?
Feb 05, 2004 04:46 PM|LINK
Devaraja.h
Member
2 Points
1 Post
Re: How do you change a SqlDataAdapter .CommandTimeout?
Jul 16, 2008 01:26 PM|LINK
Hey, Thats ok....
If I want to change the timout valuve without recompiling the application then how can I do that.....
Is that ok If I do that in web.config file......
Is it requires to recompile the application if anything changed in webconfig.......
Thanks
Devaraj