Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what are the Different types of exceptions in JDBC?

Answer Posted / venu gopal.c t.c.s

Exceptions in JDBC are usually of two types:

Exceptions occurring in the JDBC driver

Exceptions occurring in the Oracle 8i database itself

Just as PL/SQL provides for an implicit or explicit RAISE
statement for an exception, Oracle JDBC programs have a
throw statement that is used to inform that JDBC calls
throw the SQL exceptions. This is shown below.

throws SQLException
This creates instances of the class java.sql.SQLException
or a subclass of it.

And, like in PL/SQL, SQL exceptions in JDBC have to be
handled explicitly. Similar to PL/SQL exception handling
sections, Java provides a try..catch section that can
handle all exceptions including SQL exceptions. Handling an
exception can basically include retrieving the error code,
error text, the SQL state, and/or printing the error stack
trace. The SQLException class provides methods for
obtaining all of this information in case of error
conditions.

Is This Answer Correct ?    9 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is JDBC PreparedStatement?

958


What is a jdbc connection pool?

932


What is jdbc odbc in java?

1083


Why jdbc is used in java?

950


What should be done for auto generating primary key id in a table ?

973


What is the benefit of having jdbcrowset implementation? Why do we need a jdbcrowset like wrapper around resultset?

947


Give a way to check that all result sets have bin accessed and update counts are generated by execute method.

956


How the JDBC application works?

949


What is the use of jdbc?

984


How to rollback a JDBC transaction?

1094


What is jdbc and its advantages?

1057


Explain how data flows from view to db and reverse

2048


What is jdbc oracle thin?

874


Briefly tell about the jdbc architecture.

995


What is sqlwarning?

1010