sodakotahusker
Programmer
- Mar 15, 2001
- 601
We are using the Microsoft Application blocks and for some mind blowing reason - they chose not to supply a way of changing the timeout parameter - so anything over 30 seconds is going to puke. Thank heavens they compensate for their oversight by giving us the source code so we can tweak to our hearts content. So I did just that. I set a public property and then execute my query. In tracing it through the debugger the value gets set just find and all appears to be copacetic. Except for the fact that the timeout never happens. It acts exactly like changing the timeout value to 0, which tells it not to care. I set if to 300 and called a stored procedure with an infinite loop in it. 5 minutes went by. 6. 7. Finally I killed the SQL task and then control came back to my application and it errored out. So I set it to 1 and then modified my loop so that it would finish in about 10 seconds. The job finished and my program went along happily thinking all was well. So it ignores the command.CommandTimeout = xxx. Anybody have a suggestion for me to get this to work correctly? Thanks!!