When is ResultSet closed?

后端 未结 3 428
旧巷少年郎
旧巷少年郎 2020-11-30 13:33

I want to know if ResultSet can be closed if I didn\'t close it ? I have a ResultSet is closed exception but I am sure I didn\'t close the ResultSet anywhere . What I do exa

3条回答
  •  醉话见心
    2020-11-30 13:59

    I always close Connections, ResultSets and Statements in finally {} block. In such case I don't have this problem, since this block is always executed (Well, not always, but here it fits). Please refer to this post, I placed skeleton implementation that might be interesting for you.

提交回复
热议问题