将 numeric 转换为数据类型 numeric 时出现算术溢出错误
保存数据时控制台报错:
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: 将 numeric 转换为数据类型 numeric 时出现算术溢出错误。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:314)
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2717)
at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1052)
at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491)
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2715)
at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeUpdate(PreparedStatementProxyImpl.java:106)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:237)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
... 91 more
数据库长度比例(SqlServer字段长度和比例指什么意思?)

前台传来的参数为格式不对
添加前台文本框进行校验:
onkeyup= "if( !/^(((\d|[1-9]\d|[1-9]\d[1-8])(\.\d+)?)|(999(\.\d{1,2})?))$/.test(this.value)){
alertTip('不得超过1000,保留小数点后2位');
this.value='';
}"
后台接收参数后也要校验(略)
将 numeric 转换为数据类型 numeric 时出现算术溢出错误的更多相关文章
- numeric 转换为数据类型 (null) 时出现算术溢出错误
mssql数据同步到mysql时提示错误如下: 消息 8115,级别 16,状态 14,第 1 行 将 numeric 转换为数据类型 (null) 时出现算术溢出错误 问题分析如下: 1.数据字段类 ...
- 将 IDENTITY 转换为数据类型 int 时出现算术溢出错误。
IDENTITY标识列为int类型,取值范围为-2^32到2^31-1.当增长值超过这个最大值时,我在SQL Server 2008 R2 x64上试验的结果是: 将 IDENTITY 转换为数据类型 ...
- sql servel 报错:将 expression 转换为数据类型 int 时出现算术溢出错误。
执行sql语句:SELECT AVG( DATEDIFF(s,s.CreatedDate,s.SendDate) ) AS submitTime FROM dbo.SmsSend AS s ...
- 将 expression 转换为数据类型 int 时发生算术溢出
将 expression 转换为数据类型 int 时发生算术溢出错误 2种快速处理方法 1.CONVERT(bigint, 字段名): 2.Cast(字段名 as decimal(18,2)): 这个 ...
- 将expression转化为数据类型int时发生算术溢出错误
在SQL Server 中,某列的数据都在int范围之内,但是使用sum聚集函数求该列和的时候,出现“将expression转化为数据类型int时发生算术溢出错误”. 问题在于定义的数据类型: 首先, ...
- ado执行sql查询出现“发送数据流时出现算术溢出”错误
开发一个数据采集监控系统,比较变态的是有将近2000项数据.根据数据类型分多个表存储.数据库访问层采用ado.最近发现当一条sql一次性查询1700多个字段数据后就出现“发送数据流时出现算术溢出”错误 ...
- 将float转换为数据类型numeric时出现算术溢出错误
今天修改数据库字段类型,把float转换成decimal类型. 找了好多资料都没从根本上解决问题.多亏了下面的这个blog http://blog.csdn.net/wangchao1982/arti ...
- AIO5销售发货单numeric算数溢出报错:将numeric转换成数据类型numeric时出现算数溢出错误
问题描述: 销售发货单报错算数溢出:将numeric转换成数据类型numeric时出现算数溢出错误.具体如下图: 当销售发货单的数量为>7万时,报错 当销售发货单的数量为<7万时,单据正常 ...
- 解决SQL将varchar值转换为数据类型为int的列时发生语法错误
今天遇到一个这样的错误,具体的报错情况如下 解决的方案如下. 数据库MSSQL在比较大小时,出错提示:“将 varchar 值 '24.5' 转换为数据类型为 int 的列时发生语法错!”分析数据库设 ...
随机推荐
- ie7 z-index 失效问题
解决办法: 父级元素加上position:relative;并设置z-index. 父级元素的z-index优先,其中包含的元素的z-index是相对于父级元素的index. <div styl ...
- SQL Server 损坏修复 之一 常见错误解读
SQL Server 对数据库损坏的错误类型做了细化,在此对几个典型的错误作一下介绍. 错误信息是:“在文件 '%ls'中.偏移量为 %#016I64x 的位置执行 %S_MSG 期间,操作系统已经向 ...
- 转:PCA的Python实现
http://blog.csdn.net/jerr__y/article/details/53188573 本文主要参考下面的文章,文中的代码基本是把第二篇文章的代码手写实现了一下. - pca讲解: ...
- MySQL数据库select语句的使用方法
select语句可 以用回车分隔 $sql="select * from article where id=1"和 $sql="select * from article ...
- thinkphp5在URL地址里隐藏模块名
新的Thinkphp5的路由功能很强大,完全可以自定义以满足自己的要求 ThinkPHP5.0的路由规则如下:http://serverName/index.php/module/controll ...
- memcache的资料集
1. 安装与查看过程(完整) https://www.cyberciti.biz/faq/rhel-fedora-linux-install-memcached-caching-system-rpm/ ...
- Unable to create new web application
When I try to create a new web application, it just shows message as 'This should'nt take too long ...
- OpenWRT下实现Portal认证(WEB认证)
首先简单介绍一下什么是Portal认证,Portal认证,通常也会叫Web认证,未认证用户上网时,设备强制用户登录到特定站点,用户可以免费访问其中的服务.当用户需要使用互联网中的其它信息时,必须在门户 ...
- centos7没有ifconfig命令
yum search ifconfig 看到 net-tools.x86_64 : Basic networking tools 安装net-tools: yum install net-tools
- 004-Go iris 接收post json数据
package main import( "github.com/kataras/iris" "github.com/kataras/iris/middleware/lo ...