将 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 的列时发生语法错!”分析数据库设 ...
随机推荐
- 纯css解决div隐藏浏览器原生滚动条,但保留鼠标滚动效果的问题
当我们的内容超出了我们的div,往往会出现滚动条,影响美观.尤其是当我们在做一些导航菜单的时候.滚动条一出现就破坏了UI效果. 我们不希望出现滚动条,也不希望超出去的内容被放逐,就要保留鼠标滚动的效 ...
- group by 深入总结(转)
http://www.cnblogs.com/wangtao_20/archive/2011/02/23/1959792.html 一.不兼容的语法问题. 先看使用如下sql:SELECT count ...
- Spring(七):IOC&DI
什么是IOC? IOC(Inversion of Control):其思想是反转资源获取的方向. 传统的资源查找方式要求组件向容器发起请求查找资源,作为回应,容器适时的返回资源. 而应用了IOC之后, ...
- Tensorflow高速入门2--实现手写数字识别
Tensorflow高速入门2–实现手写数字识别 环境: 虚拟机ubuntun16.0.4 Tensorflow 版本号:0.12.0(仅使用cpu下) Tensorflow安装见: http://b ...
- Windows xcopy
1.考虑下面的需求,把aaa目录下面的111.txt 拷贝到 bbb,如下:echo onxcopy .\aaa\111.txt .\bbb\ /ypause2.注意这里表示路径要用右斜杠,因为左斜杠 ...
- junit mockito
package com.zendaimoney.util; import static org.mockito.Mockito.*;import static org.junit.Assert.*;i ...
- jQuery clearQueue
clearQueue()方法与clearQueue()方法结合: .clearQueue()可用于删除通过.queue()方法添加到通用jQuery序列的任何函数. 示例: <!DOCTYPE ...
- 微信小程序 - (下拉)加载更多数据
注意和后端配合就行了,前端也只能把数据拼接起来! 无论是下拉加载还是加载更多,一样的道理! 注意首次加载传递参数 注意每次加载数据数 wxml <view class='table-rank'& ...
- vsphere产品下载列表
https://my.vmware.com/cn/web/vmware/info/slug/datacenter_cloud_infrastructure/vmware_vsphere_with_op ...
- 第八周(3) Word2007样式
第八周(3) Word2007样式 教学时间 2013-4-19 教学课时 2 教案序号 23 教学目标 1.掌握样式的概念2.能够熟练地创建样式.修改样式的格式,使用样式3.熟练利用样式格式化文档 ...