In webapplication, I put
sqlcommand.CommandTimeout=0;
Is this statement is recommended or not [good progamming style], or which one is good if it is not good?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From the
SqlCommand.CommandTimeoutdocumentation:It could cause the request and the thread processes it to hang indefinitely. This is a waste of resources if nothing else.
It would also make it harder to identify if you have commands that are not completing in a reasonable time.
Not.