“/”应用程序中的服务器错误。

将 nvarchar 转换为数据类型 numeric 时出现算术溢出错误。
将 nvarchar 转换为数据类型 numeric 时出现算术溢出错误。
SELECT * FROM( SELECT ROW_NUMBER() OVER( ORDER BY [dbo].[GetOrder](IsTop,TopExpireTime) desc,[dbo].[GetOrder](IsRmd,RmdExpireTime) desc,CONVERT(varchar(100), UpdateTime, 120) desc,IfOrder desc ) AS  row ,id,TitleColor,Title,UpdateTime,IfContent,Area,Price,Images,IsInteractive,zrf,Address,AddTime,DistrictId,OperatingStatus,IsNew,IsRmd,AreaId,TypeId,Label,[dbo].[GetOrder](t.IsTop,TopExpireTime) as listtop,[dbo].[GetOrder](t.IsRmd,t.RmdExpireTime) as listrmd  FROM (select t.* from
(
select t.*, PARSENAME(replace(Area,'-' , '.'), 2) startArea,
PARSENAME(replace(Area,'-' , '.'), 1) endArea
from Information   t
where ISNUMERIC(t.Area)=0 and t.Area is not null
)t
where t.startArea  is not null and t.endArea  is not null

union all
select t.*,t.area startarea,t.area endarea from
(select top 9999999999 t.* from Information t where ISNUMERIC(t.Area)>0 and t.Area is not null) t) t WHERE Audit=1 and NatureId=3   and  City='tongling'  and State=1  and TypeId=2 and (ISNUMERIC(Price)=1 and convert(decimal,Price) between 2001 and 3000 or Price='0') ) AS TB WHERE row BETWEEN 1  AND  20

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Data.SqlClient.SqlException: 将 nvarchar 转换为数据类型 numeric 时出现算术溢出错误。
将 nvarchar 转换为数据类型 numeric 时出现算术溢出错误。
SELECT * FROM( SELECT ROW_NUMBER() OVER( ORDER BY [dbo].[GetOrder](IsTop,TopExpireTime) desc,[dbo].[GetOrder](IsRmd,RmdExpireTime) desc,CONVERT(varchar(100), UpdateTime, 120) desc,IfOrder desc ) AS  row ,id,TitleColor,Title,UpdateTime,IfContent,Area,Price,Images,IsInteractive,zrf,Address,AddTime,DistrictId,OperatingStatus,IsNew,IsRmd,AreaId,TypeId,Label,[dbo].[GetOrder](t.IsTop,TopExpireTime) as listtop,[dbo].[GetOrder](t.IsRmd,t.RmdExpireTime) as listrmd  FROM (select t.* from
(
select t.*, PARSENAME(replace(Area,'-' , '.'), 2) startArea,
PARSENAME(replace(Area,'-' , '.'), 1) endArea
from Information   t
where ISNUMERIC(t.Area)=0 and t.Area is not null
)t
where t.startArea  is not null and t.endArea  is not null

union all
select t.*,t.area startarea,t.area endarea from
(select top 9999999999 t.* from Information t where ISNUMERIC(t.Area)>0 and t.Area is not null) t) t WHERE Audit=1 and NatureId=3   and  City='tongling'  and State=1  and TypeId=2 and (ISNUMERIC(Price)=1 and convert(decimal,Price) between 2001 and 3000 or Price='0') ) AS TB WHERE row BETWEEN 1  AND  20

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[SqlException (0x80131904): 将 nvarchar 转换为数据类型 numeric 时出现算术溢出错误。
将 nvarchar 转换为数据类型 numeric 时出现算术溢出错误。
SELECT * FROM( SELECT ROW_NUMBER() OVER( ORDER BY [dbo].[GetOrder](IsTop,TopExpireTime) desc,[dbo].[GetOrder](IsRmd,RmdExpireTime) desc,CONVERT(varchar(100), UpdateTime, 120) desc,IfOrder desc ) AS  row ,id,TitleColor,Title,UpdateTime,IfContent,Area,Price,Images,IsInteractive,zrf,Address,AddTime,DistrictId,OperatingStatus,IsNew,IsRmd,AreaId,TypeId,Label,[dbo].[GetOrder](t.IsTop,TopExpireTime) as listtop,[dbo].[GetOrder](t.IsRmd,t.RmdExpireTime) as listrmd  FROM (select t.* from 
(
select t.*, PARSENAME(replace(Area,'-' , '.'), 2) startArea,
 PARSENAME(replace(Area,'-' , '.'), 1) endArea
from Information   t 
where ISNUMERIC(t.Area)=0 and t.Area is not null
)t 
where t.startArea  is not null and t.endArea  is not null 

union all
select t.*,t.area startarea,t.area endarea from 
(select top 9999999999 t.* from Information t where ISNUMERIC(t.Area)>0 and t.Area is not null) t) t WHERE Audit=1 and NatureId=3   and  City='tongling'  and State=1  and TypeId=2 and (ISNUMERIC(Price)=1 and convert(decimal,Price) between 2001 and 3000 or Price='0') ) AS TB WHERE row BETWEEN 1  AND  20]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1960506
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4890731
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2412
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +59
   System.Data.SqlClient.SqlDataReader.get_MetaData() +83
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +293
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +10
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +130
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +287
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +94
   Microsoft.Practices.EnterpriseLibrary.Data.Database.DoLoadDataSet(IDbCommand command, DataSet dataSet, String[] tableNames) +363
   Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames) +79
   Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String tableName) +54
   Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DbCommand command) +75
   web.DBoperation.CommonDAL.GetDataTable(PagingParameter para, Int32& recordCount) +1183
   web.city.list.GetPageSql(String TableName, String FileID, String Order, Repeater datalistname, Int32 pagesize, String where, String path, Int32& total) +516
   web.city.list.Page_Load(Object sender, EventArgs e) +1310
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


版本信息: Microsoft .NET Framework 版本:2.0.50727.8762; ASP.NET 版本:2.0.50727.8762