2 messages in com.mysql.lists.javaRe: Bug/Feature in mm.mysql?| From | Sent On | Attachments |
|---|---|---|
| alec...@quantel.com | 08 Nov 2001 02:05 | |
| Mark Matthews | 08 Nov 2001 04:18 |
| Subject: | Re: Bug/Feature in mm.mysql?![]() |
|---|---|
| From: | Mark Matthews (mmat...@thematthews.org) |
| Date: | 11/08/2001 04:18:02 AM |
| List: | com.mysql.lists.java |
Have you tried version 2.0.7? I think that is how it behaves (at least it's half-way there). You can get it at http://mmmysql.sourceforge.net/
If it doesn't work right, let me know, because I'm getting close to releasing 2.0.8 which has some small bug-fixes wrt. PreparedStatement.setDouble() and also some foreign key functionality that has been submitted by a user.
-Mark
----- Original Message ----- From: <alec...@quantel.com> To: <ja...@lists.mysql.com> Sent: Thursday, November 08, 2001 4:05 AM Subject: Bug/Feature in mm.mysql?
I am not sure whether this is a bug or a matter of interpretation of the java.sql definition. The ResultSet.next() method does not step on when it is on the last row of the result; it returns false and stays on the same line. It is of course correct that it returns false: this allows code of the form
while (rs.next()) <process current row>
but since it does not step off the end of the ResultSet, it does not allow code of the form
while (!rs.afterLast()) { <process current row> if (<finished with current row>) rs.next () }
I have a need for the second form, where the ResultSet cursor may be left on a row - or moved off the end. Intuitively, I feel that the next() should move on the cursor past the end of the ResultSet - this is consistent with existence of afterLast() and beforeFirst(). I realise this is a matter of opinion rather than fact.Obviously, I can fix the problem for myself, and resubmit the fix (it is pretty simple) - but I don't want to get out of step with future releases. Is this the right thing to do, or should I just change my code to work with the current interpretation. This would involve adding a "hit end" flag, which seems pretty kludgy to me.
Alec Cawley
<<-- This e-mail is intended for the named addressees only. Its contents may be privileged or confidential and should be treated as such. If you are not an intended recipient please notify the sender immediately; do not copy, distribute, or take any action based on this e-mail; and then delete it. In the pursuit of its legitimate business activities and its conformance with relevant legislation, Quantel Ltd. may access any e-mail (including attachments) it originates and receives, for potential scrutiny.
See Quantel at Newsworld : 13-16 November - Stand HL5 go to : http://www.quantel.com/newsworld for details
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail java...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail java...@lists.mysql.com instead.




