Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: multiple resultsets open
Right. Good catch.
Joe
tunity5_at_yahoo.com wrote:
> fblopes_at_pobox.com (Fabio Lopes) wrote in message news:<99935e7e.0309031045.57f32aa0_at_posting.google.com>...
>
> > Fábio.
> >
> > See the code sample:
> >
> > Connection c = DriverManager.getConnection("jdbc:oracle....", "user",
> > "psw");
> > Statement s1 = c.createStatement();
> > ResultSet rs1 = s1.executeQuery("select * from table1");
> >
> > rs1.next();
> > System.out.println("r1 " + rs1.getString("name"));
> > rs1.next();
> > System.out.println("r1 " + rs1.getString("name"));
> >
> > Statement s2 = c.createStatement();
> > ResultSet rs2 = s1.executeQuery("select * from table2");
>
> =============^^^^^^^^========================
>
> Try this statement with "s2" instead of "s1". You should be fine then.
Received on Thu Sep 04 2003 - 10:20:16 CDT