We are in the process of migrating from a SQL 2000 server to a SQL 2005 server. I have a Java application that was working flawlessly when driven by the SQL 2000 server, but is throwing a "No Current Row in the ResultSet" SQL Exception when using the SQL 2005 server. The SQL 2005 server seems to interact properly with the application for the most part, but I am consistently getting this exception when my application runs a follow-up query after the initial query.
I have looked over the database and tables on the SQL 2005 server, and as far as I can tell, they all look the same as on the SQL 2000 server. However, I really don't know a whole lot about Microsoft SQL Server.
I could post a bunch of code here, but since the problem only is present with the SQL 2005 server, I figure the problem likely isn't with my code. I'm using the jTDS SQL driver with this application. Does anyone have any ideas?
Originally posted by Jeanne Boyarsky: Scott, It sounds like the driver fixed something in the later version. Are you sharing connection/statement objects between the queries? Do you close all resources in a finally block?
I'm not sharing connection/statement objects, but I don't use a finally block to close the resources. I do it in the try block. Does that make a difference? I can try a finally block.
Closing the connections in a finally block didn't fix my problem. Also, I thought that the exception was only occurring when I did a second "follow-up" query, but it's now occasionally doing it on the initial query. There doesn't seem to be any common factor between queries that cause the exception. To make it worse, sometimes a certain query will work and sometimes the exact same query causes an exception. If it were possible, I'd just stick with the SQL 2000 server, but my agency has other plans for that server. You know what they say: if it ain't broke...