dan_l
dan_l

Reputation: 1692

ADO.NET MySqlCommand CommandTimeout

I am trying to understand MySqlCommand CommandTimeout . If it is zero , does it mean "indefinite" ?

Upvotes: 2

Views: 2686

Answers (1)

mellamokb
mellamokb

Reputation: 56769

According to the official documentation, it does seem that 0 means indefinite.

The default value is 30 secs. A value of 0 indicates an indefinite wait and should be avoided. Note the default command timeout can be changed using the connection string option Default Command Timeout.

(emphasis mine)

However, this post from October 2006 seems to indicates otherwise. Most likely the implementation has been modified since that post was made to match the official documentation. The best thing to do is give it a try and see what happens :)

Upvotes: 2

Related Questions