数据库编码com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'sex' at row 1
2017-09-10 09:30
661 查看
数据库编码com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'sex' at row 1
不要单纯的认为,是字符长度过长,这不一定,出现这种问题,一般会从这三个方面进行考虑:
第一,方法重载问题
第二,字符超过了长度
第三,就是编码问题(重要,容易被人忽略)
有两种可能,第一种就是数据库编码,另外一种数据库编码没问题,文件编码有问题
而我出现的问题,是字符超出了长度,有时候不一定是数据库长度出问题,也有可能是页面上。
学习编程最耗费时间的就是这些看似鸡毛蒜皮的小事,有句话说得好啊,阻碍你到达目标的不是前方一座座大山,而是你眼前的小石头!深有体会啊!
不要单纯的认为,是字符长度过长,这不一定,出现这种问题,一般会从这三个方面进行考虑:
第一,方法重载问题
第二,字符超过了长度
第三,就是编码问题(重要,容易被人忽略)
有两种可能,第一种就是数据库编码,另外一种数据库编码没问题,文件编码有问题
而我出现的问题,是字符超出了长度,有时候不一定是数据库长度出问题,也有可能是页面上。
学习编程最耗费时间的就是这些看似鸡毛蒜皮的小事,有句话说得好啊,阻碍你到达目标的不是前方一座座大山,而是你眼前的小石头!深有体会啊!
相关文章推荐
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'sex' at row 1”
- ### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column \'name\' at row 1
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'title' at row 1
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'title' at row 1
- Eexception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'PIC' at
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'title' at row 1
- ssh框架中的错误:com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'user_name'
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'title' at row 1
- Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'content' at ro
- ### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'articleTit
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'name' at r
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'content' a
- Data too long for column 'name' at row 1 mysql的抛出异常的解决办法--之前方法不管用-要设置数据库编码
- mysql 数据库 错误 Data truncation: Data too long for column 'name' at row 1
- MYSQL---Data too long for column 'sex' at row 1”错误处理办法
- FAQ(58):com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data truncated for column 'createDate'
- jdbc 连mysql 时报 Data too long for column 'name' at row 1 错误
- MysqlDataTruncation: Data truncation: Data too long for column 'headimg' at row 1
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value adjusted for column 'price'
- jdbc 连mysql 时报 Data too long for column 'name' at row 1 错误