Your code snippet really shouldn't have worked.  The fact that it
did looks to be a bug in the 1.x drivers.

        You might be able to write some form of script that looks for
ResultSet rs =  and then add rs.next() on the next line.  Not the best
solution and it won't get all of your code, but its a place to start.

        Randy

-----Original Message-----
From: Cato, Christopher [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 12, 2001 10:05 AM
To: [EMAIL PROTECTED]; '[EMAIL PROTECTED]'
Subject: rs.next() problems with mm.mysql/JDBC 2


Hello. Sorry for the off-topic (cross)post.

I have a web application (servlets) which consists of 48 applications. The
application was developed with the MySQL driver mm.mysql version 1.X

Version 1.X does not implement scrollable result sets.
I have just now upgraded the driver to version 2.0.4 which supports
scrollable resultsets. 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?


Regards,

Christopher Cato

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

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

Reply via email to