问题解释:java调用存储过程的时候,查询结果不能通过ResultSet来查询,需要通过CallableStatement来查询,

  比如:

ResultSet rs =  callableStatement.executeQuery();
while(rs.next()){
int empno = rs.getInt(1);
String empname = rs.getString(2);
System.out.println(empno);
System.out.println(empname);
} //这种查询方式错误,报java.sql.SQLException: ResultSet is from UPDATE. No Data. 应该通过下面的方式:
  int empno = callableStatement.getInt(1);
  String empname = callableStatement.getString(2);
  System.out.println(empno);
  System.out.println(empname);
 

java之java.sql.SQLException: ResultSet is from UPDATE. No Data.的更多相关文章

  1. Caused by: java.sql.SQLException: ResultSet is from UPDATE. No Data.

    1.错误描述 org.hibernate.exception.GenericJDBCException: error executing work at org.hibernate.exception ...

  2. javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: ResultSet is from UPDATE. No Data.

    Java jpa调用存储过程,抛出异常如下: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCEx ...

  3. resultset 对象获取行字段数据时报:java.sql.SQLException: Column 'id' not found.

    resultset 对象获取行字段数据时报:java.sql.SQLException: Column 'id' not found. 代码: String sql="SELECT d.co ...

  4. java.sql.SQLException: Operation not allowed after ResultSet closed

    转自:http://blog.csdn.net/hellobobantang/article/details/7173622 java.sql.SQLException: Operation not ...

  5. Oracle java.sql.SQLException: 数字溢出

    六月 30, 2016 5:47:47 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinit ...

  6. mybatis oracle java.sql.SQLException: 流已被关闭问题

    /** * 按照页码取值(从current_page页开始,每页page_size条) * @param key * @param params * @param current_page * @pa ...

  7. java.sql.SQLException: 对只转发结果集的无效操作: last

    出错代码如下:static String u = "user";static String p = "psw";static String url = &quo ...

  8. java.sql.SQLException: Before start of result set

    在使用JDBC查询数据库报了这么一个错误 CREATE TABLE `d_user` ( `id` int(10) NOT NULL, `name` varchar(10) DEFAULT NULL, ...

  9. java.sql.SQLException: Before start of result set解决方法

    java.sql.SQLException: Before start of result set解决方法 今天做东西的时候发现这个错误,查了查,特地记下来,以后开始积累了 哈哈 解决发法是: 使用r ...

随机推荐

  1. 4 Ionic导航和核心组件--旅游应用

    简介:在本节课中,我们将会通过一个虚构的旅游景点来构建一款功能完善的应用.本应用的核心特性是管理用户的应用内导航.本节课的主要目的,是展现构建一个完整的应用的过程. 无论是什么移动应用,最重要的功能之 ...

  2. web 界面设计---js提交表单

    <script type="text/javascript"> function checkImage(){ var imageValue = document.get ...

  3. Apache Hadoop 和Hadoop生态圈

    Apache Hadoop 和Hadoop生态圈 Hadoop是一个由Apache基金会所开发的分布式系统基础架构. 用户能够在不了解分布式底层细节的情况下.开发分布式程序.充分利用集群的威力进行快速 ...

  4. mysql11---主键普通全文索引

    .1主键索引添加 当一张表,把某个列设为主键的时候,则该列就是主键索引 create table aaa (id int unsigned primary key auto_increment , n ...

  5. C#温度报警

    using System; using System.Collections.Generic; using System.Text; using System.Collections; using S ...

  6. mysql sakila 执行失败

    1.下载 https://dev.mysql.com/doc/index-other.html 2.解压 3.将解压的文件放入某个位置,必须tmp下面 4.登录mysql 进行source处理 mys ...

  7. windows 操作系统问题的解决

    浏览器之间具有较大的差异: 如果某问题只存在于某浏览器,而其他浏览器不存在此问题,则说明,问题出在该浏览器上: 或者是缓存已满:⇒ 清除缓存: 或者浏览器的兼容性问题: 1. error 1327. ...

  8. Activity并行网关和排他网关

    说一说activiti中的排他网关和并行网关 activiti工作流中我们经常用到的网关有两种: 1. Exclusive Gateway 排他网关 排他网关.png 排他网关(也叫异或(XOR)网关 ...

  9. 如何编写linux下nand flash驱动-1

    1.       硬件特性: [Flash的硬件实现机制] Flash全名叫做Flash Memory,属于非易失性存储设备(Non-volatile Memory Device),与此相对应的是易失 ...

  10. 让CentOS启动后直接进入命令行模式(转载)

    转自:http://361324767.blog.163.com/blog/static/114902525201285101410206/ CentOS中如何进入图形界面和文字界面,Linux真正的 ...