com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'sex' at row 1”
2016-08-18 16:00
696 查看
单纯一看,说是什么数据对于列‘sex’过长。我修改了数据库,将此列的字长修改大一点,问题依然存在,
弄了大半天,还是解决不了。我上网查了很多资料,都是说什么编码不统一之类的。我又将所有文件检查了一遍
,所有编码我都设置成utf-8啊,奇怪了!搞了一天还是搞不定,郁闷(编程的时候就是这个时候最郁闷的)
!最后去请教老师的时候,说是数据库的问题。我回来在一次查看,果然,
数据库里的“sex”等列的编码我都不是设置成utf-8的,改了一下,问题解决。
阻碍你到达目标的不是前方一座座大山,而是你眼前的小石头!
弄了大半天,还是解决不了。我上网查了很多资料,都是说什么编码不统一之类的。我又将所有文件检查了一遍
,所有编码我都设置成utf-8啊,奇怪了!搞了一天还是搞不定,郁闷(编程的时候就是这个时候最郁闷的)
!最后去请教老师的时候,说是数据库的问题。我回来在一次查看,果然,
数据库里的“sex”等列的编码我都不是设置成utf-8的,改了一下,问题解决。
阻碍你到达目标的不是前方一座座大山,而是你眼前的小石头!
相关文章推荐
- 数据库编码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
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'name' at r
- 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
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'title' at row 1
- Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'content' a
- 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
- 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
- Eexception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'PIC' at
- jdbc 连mysql 时报 Data too long for column 'name' at row 1 错误
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value adjusted for column 'price'
- MYSQL---Data too long for column 'sex' at row 1”错误处理办法
- mysql 数据库 错误 Data truncation: Data too long for column 'name' 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
- MySQL - Data too long for column 'uid' at row 1 Query: