So, are there implied catches in there for SQLException (I assume there are)?
In the innermost try block, does the catch rethrow the SQLException so that
it cascades to the outer blocks?


Just trying to understand the model.

Dean Hoover

Larry Meadors wrote:

Yes.

You really might want to consider a tool like iBATIS, but if you want to
do it yourself, here is the pattern:

Connection c = null;
try{
 //get connection
 try{
   // get statement
   try{
     // get result set
     // process result set
   }finally{
     // close result set if not null
   }
 }finally{
   // close statement if not null
 }
}finally{
 //close connection if not null
}

Larry

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to