java.sql.SQLException: After end of result set in mysql

后端 未结 2 601
执念已碎
执念已碎 2020-12-04 02:14

I am trying to Download image (.png) file from MYSQL. some time it works fine.unable find exact problem. it works properly on Jboss server. throws an error while trying to r

2条回答
  •  借酒劲吻你
    2020-12-04 02:29

    The second result.next is moving you past the end of the result set.

    I think you want

    result = st.executeQuery();
    if(result.next()){
       input = result.getAsciiStream(1);
    }
    

提交回复
热议问题