求教高手,JDBC驱动问题:Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);一直报 那就是你的jdbc driver不支持jdbc 2.0喽,换个jdbc driver试试 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 db2 7.1 版本的驱动还不支持jdbc 2吗??如果这个驱动还不行,那还有哪个版本的DB2 驱动行啊?? 同一句话你试试用jdbc-odbc桥看是驱动的问题不是。 用jdbc-odbc桥是可以的,我现在就是这样做的但是那样为什么不行??DB2 7.1 中的db2java.zip文件都不够新吗?? 请教高手........................源程序: Connection conn=null; String sDBDriver="COM.ibm.db2.jdbc.net.DB2Driver" String sConnUrlStr="jdbc:db2://wz-server/bpbj" try { Class.forName(sDBDriver); } catch (java.lang.ClassNotFoundException e) { System.out.println("Class forName Error:"+e.getMessage()); } try { conn=DriverManager.getConnection(sConnUrlStr,Page.getDbUserID(),Page.getDbPassword()); } catch (SQLException ex) { System.out.println("getConnection Error:"+ex.getMessage()); } Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); 我觉得你该换换JDBC驱动试试,不能一棵树吊死。先试试吧 没错啊.你把ResultSet的属性换换试试. 问题已经解决了,是db2的那个驱动默认是jdbc1的,要用她自带的bat文件升级jdbc2 如何理解这个 提两个小问题。 JTable中嵌入两个JButton 打开网页超时问题 在Linux OS 上运行Java程序 【很搞的问题: 进来看看啊】 菜鸟问题之2!快回答,快给分! sql server的驱动程序在哪??? java调用dll的问题???至今没有解决!!!求救!!! 求助,jdk环境变量设置了,但是显示的和设置的不一样 panelayout在jb6什么地方? 这段代码怎么究竟哪里出错!?(在线等)
如果这个驱动还不行,那还有哪个版本的DB2 驱动行啊??
你试试用jdbc-odbc桥
看是驱动的问题不是。
Connection conn=null;
String sDBDriver="COM.ibm.db2.jdbc.net.DB2Driver"
String sConnUrlStr="jdbc:db2://wz-server/bpbj"
try {
Class.forName(sDBDriver);
} catch (java.lang.ClassNotFoundException e) {
System.out.println("Class forName Error:"+e.getMessage());
}
try {
conn=DriverManager.getConnection(sConnUrlStr,Page.getDbUserID(),Page.getDbPassword());
} catch (SQLException ex) {
System.out.println("getConnection Error:"+ex.getMessage());
}
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
先试试吧
你把ResultSet的属性换换试试.