tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cato, Christopher" <cc...@rational.com>
Subject rs.next() problems with mm.mysql/JDBC 2
Date Mon, 12 Feb 2001 15:04:57 GMT
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

Mime
View raw message