Thank you all for the speedy help!

Regards,

Christopher Cato



> First, I presume you meant to say executeQuery(), since 
> execute() does not
> return a ResultSet.
> 
> Second, the documentation is very clear for ResultSet. Your 
> original code
> should have never worked in the first place. A call to next() 
> is required
> to position to the first row. If the MM driver allowed this 
> to work, then
> that was a poor design choice for MM.
> 
> Finally, if you do not want to correct all of your code, then I would
> recommend that you go back to the older MM driver that 
> provided you with
> the broken behavior, until you have time to fix your code.
> 
> Also, I agree with Cris that "if ( rs.next() ) { ... } else { 
> ... }" is a
> better construct when you expect a one row result.
> 
> tim.
> 
> > > In my code, there are quite a number of spots where I
> > > directly read a one-row response like follows:
> > >
> > > ---------------------------------------------------
> > > ResultSet rs = stmt.execute(sql);
> > >
> > > String userId = rs.getString("userid");
> > > String status = rs.getString("accountStatus");
> > > ----------------------------------------------------
> > >
> > > Now, this won't work anymore because there is now a 
> position 'before' and
> > > 'after' the result set implemented in the new mm.mysql driver.
> > >
> > > Does anyone have any idea how I could fix this without 
> having to rewrite all
> > > of my applications? Or do I really have to put ALL these within
> > > while(rs.next()){} loops?
> >
> > I put them inside if (rs.next()) conditionals, though I'm 
> sure that's
> > not what you are looking for. Or outside if (!rs.next()) 
> conditionals.
> > It does give one a chance to check the corner cases.
> > 
> > -Cris
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to