换驱动,最好该为Type4的驱动。
解决方案 »
- CXF WebServices
- weblogic realm的配置
- spring 2.0 aop捕获异常
- 如何在JSP中嵌入HTML在线编辑器啊!!!!!!!!!!!!!
- 分页问题
- 实现像WEB MSN、WEB版淘宝旺旺这样BS结构的即时通讯应用
- rs.getdate()获得的日期没有时分秒怎么弄?用什么办法可以解决?
- 如何在dao中获取 插入一条记录的id
- 那位高人可以给详细介绍一下JSP内部对象application到底是做什么的?
- java取json数据的前十条数据
- weblogic+jbuilder运行时没有用到他的例子数据库也报错阿?在线等?急!
- jbuilder 添加按钮,constraints为什么只有 东南西北和居中.
包括
weblogic.jdbc.mssqlserver4.Driver
odbc driver
MSSQL SERVER的JDBC驱动(从微软下载)
换驱动,最好该为Type4的驱动,怎么操作
你可以 statement = connection.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY );
ResultSet rs=stmt.executeQuery(sql);
说明:
CONCUR_READ_ONLY The constant indicating the concurrency mode for a ResultSet object that may NOT be updated.static intCONCUR_UPDATABLE The constant indicating the concurrency mode for a ResultSet object that may be updated.static intFETCH_FORWARD The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last.static intFETCH_REVERSE The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first.static intFETCH_UNKNOWN The constant indicating that the order in which rows in a result set will be processed is unknown.static intTYPE_FORWARD_ONLY The constant indicating the type for a ResultSet object whose cursor may move only forward.static intTYPE_SCROLL_INSENSITIVE The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes made by others.static intTYPE_SCROLL_SENSITIVE The constant indicating the type for a ResultSet object that is scrollable and generally sensitive to changes made by others
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet rs=stmt.executeQuery(sql);
仍不行
我的JDBC
用的是JB7
默认的驱动,不知是不是有问题
不过错误提示是JDBC2.0错误
error : This JDBC 2.0 method is not implemented
weblogic.jdbc.mssqlserver4.Driver原来也不行
SQL本身就可以
谢谢大家Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet rs=stmt.executeQuery(sql);