File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "JDBC" Watch "JDBC" New topic
Author

JDBC

Satyajit Parida
Greenhorn

Joined: Nov 24, 2006
Posts: 3
Why try catch is required(compulsory) for JDBC connection?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

It isn't required, you can always propagate exceptions.
But, databases are often remote processes and possibly on remote machines, and therefore you always need to be aware of the possibility of failure.
Satyajit Parida
Greenhorn

Joined: Nov 24, 2006
Posts: 3
Thanks David.I may have presnented this question not in a clear way.I was asking why we need to enclose our jdbc code in a try- catch block (handle it).I found the answer and it lies in checked exception handling.
[ July 09, 2008: Message edited by: Satyajit Parida ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC
 
Similar Threads
Loading file data into a DB2 table using java
java sql parser
Need help to write a bot to collect data from internet.
Need guidance for SCJD exam preparation
WA #1.....word association