Le mar, 18 avr 2000, vous avez �crit :
> Peter Mount wrote:
>
> > Ah, forgot that bit. I put them under finally as it always gets run,
> > although you have to wrap them in a try{} win finally if the parent
> > method doesn't throw SQLException.
> >
> > Peter
> >
>
> The problem with that is that close() itself can throw a SQLException so
> you have to wrap it twice.
so we have either :
finally {
try {
if (conn!=null) conn.close();
} catch (SQLException ignore) {}
}
or eventually :
inally {
try {
conn.close();
} catch (Exception ignore) {}
}
The second also deals with NullPointerException
--
Guillaume Rousse
Iremia - Universit� de la R�union
Sleep doesn't exists. Just lack of cafeine.