Hey. When I try to access my application at the URL, I get an error screen containing the following error. I used to fix this with the dbcc commands in the backend..bt now this doesn't work.
Timed out. The wait period expires before the operation is completed or the server is not responding. Description: An unhandled exception occurred during the execution of the current web request. View the stack trace for more information about the error and its occurrence in the code.
Exception Details: System.Data.SqlClient.SqlException: Timed out. The wait period expires before the operation is completed or the server is not responding.
Source Error:
An unhandled exception was thrown during the execution of the current web request. Information about the origin and location of the exception can be identified using the trace of the exception stack below.
here is my source code for a saved proc that I call from my .NET application.
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]
The same proc works if I do not use the start and end date parameter that I used above and call dbo.FN_TCOV3 (@rpt_year) AS allApps instead of dbo.FN_TCOV3_Report (@From_Date, @End_Date) AS allApps, the only diff. b / w these two functions: one takes only one year as a parameter, and the other takes 2 parameters, namely the start and end date.
I need to use both parameters, Pls help.