您好当我尝试通过 URL 访问我的应用程序时,我收到包含以下错误的错误屏幕。以前我通过在后端使用 dbcc 命令修复它..bt 现在这不起作用..
超时已过。在操作完成之前超时时间已过或服务器没有响应。说明:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
异常详细信息:System.Data.SqlClient.SqlException:超时已过期。在操作完成之前超时时间已过或服务器没有响应。
源错误:
在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。
这是我从 .NET 应用程序调用的存储过程的源代码。
USE [TCO]
GO
ALTER PROC [dbo].[SP_TCOV3] (@year INT) AS
DECLARE @rpt_year INT;
IF @year > 2011
BEGIN
SET @rpt_year = 2011;
END
ELSE
BEGIN
SET @rpt_year = @year;
END
DECLARE @From_Date DATETIME='01-01-2012' -- mm/dd/yyyy
DECLARE @End_Date DATETIME=(SELECT TOP 1 DATEADD(dd, -DAY(DATEADD(m,1,dbo.ManpowerCost.payment_date)), DATEADD(m,1,dbo.ManpowerCost.payment_date)) as value
FROM dbo.ManpowerCost order by payment_date desc)
(
SELECT
allApps.[Application Name],
'$'+(CAST((CAST(allApps.[BAM Staff Support] AS DECIMAL(10,2))) as varchar(50)))AS [BAM Staff Support],
'$'+(CAST((CAST(allApps.[BAM Non-Shell Support] AS DECIMAL(10,2))) as varchar(50)))AS [BAM Non-Shell Support] ,
'$'+(CAST((CAST(allApps.[BSM DBA Support] AS DECIMAL(10,2))) as varchar(50)))AS [BSM DBA Support] ,
'$'+(CAST((CAST(allApps.[Middleware Support] AS DECIMAL(10,2))) as varchar(50))) AS [BSM Middleware Support],
'$'+(CAST((CAST(allApps.[IRM Logical Access] AS DECIMAL(10,2))) as varchar(50)))AS [IRM Logical Access] ,
'$'+(CAST((CAST(allApps.[Application Licensing and Maintenance] AS DECIMAL(10,2))) as varchar(50))) AS [Application License and Maintenance],
'$'+(CAST((CAST(allApps.[Middleware Licensing and Maintenance] AS DECIMAL(10,2))) as varchar(50)))as [Middleware License and Maintenance],
'$'+(CAST((CAST(allApps.[Database Licensing and T-System DBA Maintenance] AS DECIMAL(10,2))) as varchar(50))) AS [TS DBA Maintenance],
'$'+(CAST((CAST(allApps.[Hosting and Storage] AS DECIMAL(10,2))) as varchar(50)))AS [Hosting and Storage] ,
'$'+(CAST((CAST(allApps.[Telecom Connection Charge] AS DECIMAL(10,2))) as varchar(50))) AS [Telecom Connection Charges],
'$'+(CAST((CAST(allApps.[Total Application TCO] AS DECIMAL(10,2))) as varchar(50)))AS [Total Application TCO]
FROM
--dbo.FN_TCOV3(@rpt_year)AS allApps
dbo.FN_TCOV3_Report(@From_Date,@End_Date)AS allApps
)ORDER BY allApps.[Application Name]
如果我不使用上面使用的开始日期和结束日期参数并调用dbo.FN_TCOV3(@rpt_year)AS allApps而不是 dbo.FN_TCOV3_Report(@From_Date,@End_Date)AS allApps,则相同的过程正在工作,唯一的区别. b/w 这两个函数是一个只需要一年作为参数,另一个需要 2 个参数,即开始和结束日期。
我需要同时使用这两个参数,请协助。