Ok, that's probably not what you were after....

On Aug 18, 11:34 am, Christian Catchpole <christ...@catchpole.net>
wrote:
> Go the "finally"..  (there is that risk of the original exception
> being lost and knock on ones cropping up)
>
>         PreparedStatement ps = connection.prepareStatement(sql);
>         try {
>             ResultSet resultSet = ps.executeQuery();
>             try {
>                 while (resultSet.next()) {
>                     // stuff
>                 }
>             } finally {
>                 resultSet.close();
>             }
>         } finally {
>             ps.close();
>         }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javaposse@googlegroups.com
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to