Execution: java.sql.SQLException: Result set type is TYPE_FORWARD_ONLY
Got confused. Tried tinkering around for a while. Nothing. Then thought probably the server has gone bonkers. Changed my code to
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
Still nothing. Posted on Sun Java forums. Someone suggested it could be an issue with the driver. Realized that the only way to test would be changing the driver. Changed it to JTDS from SourceForge. Same error. Hey!!!
Did a Google with the error message. It cropped up this link. It turned out that any SP in SQL Server with more than one SELECT or a SELECT with SET/PRINT degrades the resultset type. Modified my SP and it works now.
No comments:
Post a Comment