BIRT 3.7
Written by: Michael Williams
Featured Refcardz: Top Refcardz:
  1. Eclipse for Spring
  2. MVVM Pattern
  3. Eclipse RCP
  4. Silverlight/WP7
  5. Eclipse Plug-ins
  1. BIRT 3.7
  2. Ajax
  3. Eclipse
  4. jQuery Selectors
  5. Spring Config.

Link Details

Link 301219 thumbnail
User 519571 avatar

By memiso
via memiso.com
Published: Nov 24 2009 / 07:24

Before giving structures, we need to notice a little detail about making database connections in Java. All database connections must be stated in try and catch statements, because there is a possibility of getting an exception. That’s way, we try to make our connection in try statement. If our connection attempt fails, that means there is an exception, and the exceptions must be catched.
  • 6
  • 20
  • 2845
  • 0

Comments

Add your comment
User 320229 avatar

vaibhavmishra replied ago:

0 votes Vote down Vote up Reply

I don't get it, why is so much down votes, is it the MS factor?

User 171053 avatar

apolci replied ago:

1 votes Vote down Vote up Reply

No, it isn't the MS factor.
Simply the code is really bad and shouldn't be taken as reference.
For example look at the myconn static field. Why it is a field instead of a local variable?

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.