DBLinq查询超时报异常
项目中使用的是DBLinq,查询大量数据时出现异常,如下:
Error Message:Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at Att.DataAccess.DALAttendace_Report.SelectAttendanceReportsData(String countryCode, String SwipeLocCode, List`1 StafflocCode, List`1 deptCode, String staffID, String staffName, String statusCode, DateTime beginDate, DateTime endDate, Int32 Status_ID) in D:\????\Attendance_HRMS\Attendance\DataAccess\DALAttendace_Report.cs:line 572
at Att.BLL.BLLAttendace_Report.SelectAttendanceReportsData(String countryCode, String SwipeLocCode, List`1 StafflocCode, List`1 deptCode, String staffID, String staffName, String statusCode, DateTime beginDate, DateTime endDate, Int32 Status_ID) in D:\????\Attendance_HRMS\Attendance\BLL\BLLAttendace_Report.cs:line 67
at Enquiry_HR_Daily_Report.selectReportInfo(String s_date, String e_date) in c:\CF_UAT\wwwroot\HK_Attendance\Enquiry\HR_Daily_Report.aspx.cs:line 281