Subject | Re: One PreparedStatment many ResultSet |
---|---|
Author | Roman Rokytskyy |
Post date | 2003-10-29T21:14:15Z |
> Is next code is valid?No, code is not valid. When you execute statement the second time,
> PreparedStatment ps=connection.prepare("...........");
> ResultSet rs1,rs2;
> ps.setInt(1,1);
> rs1=ps.executeQuery();
> ps.setInt(1,2);
> rs2=ps.executeQuery();
> rs1.next();
> rs2.next();
> if(rs1.getInt(1)!=rs2.getInt(1))
> Is one PreparedStatment contanes many open ResultSet? This range of
> JDBC or FirBird
first result set is closed.
Best regards,
Roman Rokytskyy