You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.Exception: Value was either too large or too small for an Int32.
---> System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ThrowInt32OverflowException()
at System.Convert.ToInt32(UInt64 value)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at lambda_method25(Closure , Type , Int32[] , DbDataReader , Int32 , CommonUtils )
at FreeSql.Internal.Utils.ExecuteArrayRowReadClassOrTuple(String flagStr, Type typeOrg, Int32[] indexes, DbDataReader row, Int32 dataIndex, CommonUtils _commonUtils)
at FreeSql.Internal.CommonProvider.Select0Provider2.<>c__DisplayClass102_11.b__0(FetchCallbackArgs1 fetch) at FreeSql.Internal.CommonProvider.AdoProvider.<>c__DisplayClass152_0.<ExecuteReaderAsync>b__0(FetchCallbackArgs1 fetch, Int32 result)
at FreeSql.Internal.CommonProvider.AdoProvider.ExecuteReaderMultipleAsync(Int32 multipleResult, DbConnection connection, DbTransaction transaction, Func3 fetchHandler, Action2 schemaHandler, CommandType cmdType, String cmdText, Int32 cmdTimeout, DbParameter[] cmdParms, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at FreeSql.Internal.CommonProvider.AdoProvider.LoggerException(IObjectPool1 pool, PrepareCommandResult pc, Exception ex, DateTime dt, StringBuilder logtxt, Boolean isThrowException) at FreeSql.Internal.CommonProvider.AdoProvider.ExecuteReaderMultipleAsync(Int32 multipleResult, DbConnection connection, DbTransaction transaction, Func3 fetchHandler, Action2 schemaHandler, CommandType cmdType, String cmdText, Int32 cmdTimeout, DbParameter[] cmdParms, CancellationToken cancellationToken) at FreeSql.Internal.CommonProvider.Select0Provider2.ToListQfPrivateAsync[TTuple](String sql, String field, CancellationToken cancellationToken)
at FreeSql.Internal.CommonProvider.Select0Provider`2.CountAsync(CancellationToken cancellationToken)
The text was updated successfully, but these errors were encountered:
问题描述及重现代码:
CountAsync() await this.ToListAsync() 数据条数大于int值引发异常 请调整数据类型。
System.Exception: Value was either too large or too small for an Int32.
---> System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ThrowInt32OverflowException()
at System.Convert.ToInt32(UInt64 value)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at lambda_method25(Closure , Type , Int32[] , DbDataReader , Int32 , CommonUtils )
at FreeSql.Internal.Utils.ExecuteArrayRowReadClassOrTuple(String flagStr, Type typeOrg, Int32[] indexes, DbDataReader row, Int32 dataIndex, CommonUtils _commonUtils)
at FreeSql.Internal.CommonProvider.Select0Provider
2.<>c__DisplayClass102_1
1.b__0(FetchCallbackArgs1 fetch) at FreeSql.Internal.CommonProvider.AdoProvider.<>c__DisplayClass152_0.<ExecuteReaderAsync>b__0(FetchCallbackArgs
1 fetch, Int32 result)at FreeSql.Internal.CommonProvider.AdoProvider.ExecuteReaderMultipleAsync(Int32 multipleResult, DbConnection connection, DbTransaction transaction, Func
3 fetchHandler, Action
2 schemaHandler, CommandType cmdType, String cmdText, Int32 cmdTimeout, DbParameter[] cmdParms, CancellationToken cancellationToken)--- End of inner exception stack trace ---
at FreeSql.Internal.CommonProvider.AdoProvider.LoggerException(IObjectPool
1 pool, PrepareCommandResult pc, Exception ex, DateTime dt, StringBuilder logtxt, Boolean isThrowException) at FreeSql.Internal.CommonProvider.AdoProvider.ExecuteReaderMultipleAsync(Int32 multipleResult, DbConnection connection, DbTransaction transaction, Func
3 fetchHandler, Action2 schemaHandler, CommandType cmdType, String cmdText, Int32 cmdTimeout, DbParameter[] cmdParms, CancellationToken cancellationToken) at FreeSql.Internal.CommonProvider.Select0Provider
2.ToListQfPrivateAsync[TTuple](String sql, String field, CancellationToken cancellationToken)at FreeSql.Internal.CommonProvider.Select0Provider`2.CountAsync(CancellationToken cancellationToken)
The text was updated successfully, but these errors were encountered: