小巧的例外。算术溢出

时间:2017-08-19 19:48:11

标签: ms-access dapper

ms访问数据库中的数字字段(大小为double)的值为4294965247.(FFFF F7FF)

我正在尝试将其映射到我的对象的uint属性,该属性因算术溢出而失败。

Arithmetic operation resulted in overflow.
Error parsing column 2 (lAccessRights=4294965247 - Double)


   at Dapper.SqlMapper.ThrowDataException(Exception ex, Int32 index, IDataReader reader, Object value)
   at Deserialize78e9ac87-70be-4f31-b744-b07a47b42844(IDataReader )
   at Dapper.SqlMapper.<QueryImpl>d__69`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Dapper.SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable`1 commandTimeout, Nullable`1 commandType)
   at DapperExtensions.DapperImplementor.GetList[T](IDbConnection connection, IClassMapper classMap, IPredicate predicate, IList`1 sort, IDbTransaction transaction, Nullable`1 commandTimeout, Boolean buffered) in c:\Projects\nuget\PhenixDev\DapperExtensions\DapperExtensions\DapperImplementor.cs:line 266
   at DapperExtensions.DapperImplementor.GetList[T](IDbConnection connection, Object predicate, IList`1 sort, IDbTransaction transaction, Nullable`1 commandTimeout, Boolean buffered) in c:\Projects\nuget\PhenixDev\DapperExtensions\DapperExtensions\DapperImplementor.cs:line 214
   at DapperExtensions.DapperExtensions.GetList[T](IDbConnection connection, Object predicate, IList`1 sort, IDbTransaction transaction, Nullable`1 commandTimeout, Boolean buffered) in c:\Projects\nuget\PhenixDev\DapperExtensions\DapperExtensions\DapperExtensions.cs:line 191
   at MobileRCService.Repositories.DBProviderBase.ReadFiltered[T](IFieldPredicate predicate) in ...Repositories\DBProviderBase.cs:line 44
   at MobileRCService.Repositories.UserRepo.Init() in ...Repositories\UserRepo.cs:line 25
   at MobileRCService.Repositories.UserRepo..ctor(TinyIoCContainer container) in ...Repositories\UserRepo.cs:line 19
   at lambda_method(Closure , Object[] )
   at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options)

如果我改变ulong的属性类型一切正常,但我很好奇为什么uint没有。

我检查了这个应用程序创建的其他一些数据库,有趣的是,我注意到了这个领域的负值。如何从uint字段创建负值...

0 个答案:

没有答案