用mysql做一个ip地下址库,把ip地址转换成long型后插到数据库(数据库该字段用的是bigint,文档中说有符号的范围是-9223372036854775808到9223372036854775807,无符号的范围是0到
18446744073709551615。),为什么在发生溢出先前用的是hibernate以为是hibernate有问题,改用jdbc插也不行发生溢出,变成负数了,改用unsiged也不行,呵呵,当然会不行,也只多一位 这是jdbc错误抛出异常:Exception in thread "main" java.sql.BatchUpdateException: Data truncation: Out of range value adjusted for column 'lstartip' at row 1
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1269)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:955)
at Initdata3.main(Initdata3.java:106
18446744073709551615。),为什么在发生溢出先前用的是hibernate以为是hibernate有问题,改用jdbc插也不行发生溢出,变成负数了,改用unsiged也不行,呵呵,当然会不行,也只多一位 这是jdbc错误抛出异常:Exception in thread "main" java.sql.BatchUpdateException: Data truncation: Out of range value adjusted for column 'lstartip' at row 1
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1269)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:955)
at Initdata3.main(Initdata3.java:106
解决方案 »
- 远程访问数据库,怎样使得传输时加密,类似ssl的
- MySQL导入*.sql文件出错
- mysql下limit
- 第当服务器回收进程时就会显示两个错误。怎么改啊。
- 分区表的效能是否是这样的?
- Cannot convert value '0000-00-00 00:00:00' from column 37 to TIMESTAMP.
- mysql存储过程 动态拼接语句的问题!!急(寻高手)
- PostgreSQL下sql文件的问题
- mysql5.1的驱动包
- mysql5.0.27 创建procedure 时,为什么select * from sp_test出错
- 那个版本的MySql更好更稳定?MySql与PB 一起开发有何优势和劣势? 请各位大侠给予指点? 非常感谢!
- mysql4导出的utf8数据库,导入到mysql5后,表中数据中文显示为乱码,请问怎么解决啊?
inet_aton和inet_ntoa