C# SQL语句执行时间过长在操作完成之前超时时间已过或服务器未响应问题的解决

   SqlCommand sold_cmd = new SqlCommand(sql_sold,conn);
   sold_cmd.CommandTimeout = 300;
   SqlCommand detail_cmd = new SqlCommand(sql_detail,conn);
   detail_cmd.CommandTimeout = 300;
 
   sqlDA_sold.SelectCommand = sold_cmd;
   sqlDA_detail.SelectCommand = detail_cmd;

你可能感兴趣的:(C#开发)