简体   繁体   中英

Use one result set to query another result set in JSP

Is it possible to use one result set to query another result set in JSP?

Given code:

Resultset rs1=(execute some query);

Resultset rs2=(use rs1 to query);

By default, only one ResultSet object per Statement object can be open at the same time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All execution methods in the Statement interface implicitly close a statment's current ResultSet object if an open one exists.

So if your trying to read rs1 in rs2, this time rs1 is closed. Hope it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM