Watch this video on YouTube
Compact guide to using JDBC ResultSet with SQL Server showing connection query iteration and resource cleanup for reliable Java database code