![](https://iknow-base.cdn.bcebos.com/lxb/notice.png)
JAVA用JDBC连接SQL server 2005出现错误
pstmt.executeQuery();//这一句报错该语句没有返回结果集。atcom.microsoft.sqlserver.jdbc.SQLServerExcept...
pstmt.executeQuery();//这一句报错
该语句没有返回结果集。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:130)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:375)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:322)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4003)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1550)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:160)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:133)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:265) 展开
该语句没有返回结果集。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:130)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:375)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:322)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4003)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1550)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:160)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:133)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:265) 展开
3个回答
2013-05-27
展开全部
prepare的时候出错了。pstmt.executeQuery();检查之前的pstmt.prepare()语句
![](https://ecmc.bdimg.com/public03/b4cb859ca634443212c22993b0c87088.png)
2023-10-18 广告
作为上海碧茂信息科技有限公司的工作人员,对于Hadoop集群中小文件过多的问题,可以采取以下处理方法:1. 使用Hadoop Archive(HAR)文件技术。HAR是一种Hadoop文件系统中的归档格式,可将小文件组合成一个大文件,从而降...
点击进入详情页
本回答由碧茂科技提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询