How do I decide what length of time to use as a timeout when using an SqlCommand object?
On parts of the code I\'m working on (written by somebody else) I have:
This is in SECONDS and it depends entirely on how long the actual SQL command is likely to take.
For example example, most of our commands run sproc's that should take no longer than 30 seconds to complete, however there are a couple that run for much longer, which means they have their own high valued timeouts.
You'll need to profile how long on average your routine takes then adjust the timeout accordingly, and remember to leave room for variables like latency etc.