Increasing the Command Timeout for SQL command

前端 未结 5 1756
死守一世寂寞
死守一世寂寞 2020-12-08 09:04

I have a little problem and hoping someone can give me some advice. I am running a SQL command, but it appears it takes this command about 2 mins to return the data as there

5条回答
  •  悲哀的现实
    2020-12-08 09:45

    Add timeout of your SqlCommand. Please note time is in second.

    // Setting command timeout to 1 second
    scGetruntotals.CommandTimeout = 1;
    

提交回复
热议问题