ado的rs.field("字段名")可以访问任何类型的数据,那吗java里面这种问题如何处理。是不是要先判断类型然后再根据类型来使用相应的getint or getString阿!谢谢了!在线等待! java.sql.ResultSet.getString()给分 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 getString 可访问大部分的类型,public String getString(int columnIndex) throws SQLExceptionGets the value of the designated column in the current row of this ResultSet object as a String in the Java programming language. 如果字段是NULL,那么可能会有NullPointerException 我觉得是那样的,因为好多例子实现你说的功能都用了ResultSetMetaData类,这个类中有专门的方法去判断字段的类型,然后再根据类型去写对应的访问方法 要么不检查用getstring方法,到外面应用的时候在转,要么已经知道类型,用适当的.要么用想ge_yc的方法. JAVA 中JTable怎么设置表头!!! 请教关于linux下java类DateFormat的使用! 怎么用一个父类对象初始化子类 实现浮点数到16进制的转换, double数据类型精度问题求教 请问有哪些比较好看的LookAndFeel下载啊?最好把下载网址也贴一贴!!3X 初学java应看什么书? 各位我下了一个jb编程100例为什么所有程序都有这个错误啊? 真正理解JAVA的高手请进来挑战挑战! 时间问题 如何将jar文件编译为exe 文件 在Applet中怎么样象硬盘写入一个文本文件?
public String getString(int columnIndex)
throws SQLException
Gets the value of the designated column in the current row of this ResultSet object as a
String in the Java programming language.
要么用想ge_yc的方法.