当利用java从数据库读取数据时,出现
e:数字溢出
的错误时,说明数据库表中字段长度大于10位后的所有数据均没有查询出来,此时返回值类型由int 改为BigDecimal。此外需将以下
String itemtext =rs.getString("TEXT");//Get the current row specified column values
Int pid =rs.getInt("PID");
更改为:
String itemtext =rs.getString("TEXT");//Get the current row specified column values
BigDecimal pid =rs.getBigDecimal("PID");