错误提示:
Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
存储过程oa_YTWFHT 在数据查询分析器执行速度挺快的            private void funNnd()
            {
                string tReturn = "";
                string sheetID = this.SheetNo;
                string sqlHRConnectionString = ConfigurationManager.ConnectionStrings["OASqlServer"].ConnectionString;
                SqlConnection con = new SqlConnection(sqlHRConnectionString);
                con.Open();
                string strSql = "exec dbo.oa_YTWFHT '" + sheetID + "'";
                SqlDataAdapter AD = new SqlDataAdapter(strSql, con);
                DataSet ds = new DataSet();
                AD.Fill(ds);
                con.Close();
                tReturn = ds.Tables[0].Rows[0][0].ToString();
            }
create PROC [dbo].[oa_YTWFHT](@sheetID varchar(80))
AS
DECLARE  @HEADa nvarchar(8)
DECLARE  @HEADb nvarchar(4)
DECLARE  @HEAD  nvarchar(12)
DECLARE  @MAXd  nvarchar(4)
BEGIN
select @HEADa = stuff(year(GETDATE()),1,0,'B00-') 
from wfht 
where wfht002 = @sheetID --'1107050010'
select @MAXd = max(wfht018)+1 
from wfht 
where wfht002 like '11%'
select @HEADb = stuff(@MAXd,1,1,'-') 
from wfht 
where wfht002 = @sheetID
set @HEAD = @HEADa + @HEADb
update wfht
set 
wfht003 = @HEAD
,wfht018 = @MAXd
from 
wfht 
where wfht002 = @sheetID
select 'OK'
END
做如下修改将不会出错
create PROC [dbo].[oa_YTWFHT](@sheetID varchar(80))
AS
DECLARE  @HEADa nvarchar(8)
DECLARE  @HEADb nvarchar(4)
DECLARE  @HEAD  nvarchar(12)
DECLARE  @MAXd  nvarchar(4)
BEGIN
select 'OK'
END