This article may be too technical for most readers to understand. The drivers listed in jdbc. The distinctive characteristic of type 2 jdbc drivers are that Type 2 drivers convert JDBC calls into database-specific calls i. Thus the performance is considerably improved. Please help improve it to make it understandable to non-experts , without removing the technical details. So if you want to catch any database related error below is the code snippet to go about it:

Uploader: Tolrajas
Date Added: 24 May 2006
File Size: 40.48 Mb
Operating Systems: Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X
Downloads: 54433
Price: Free* [*Free Regsitration Required]

Some ODBC native code and in many cases native database client code must be loaded on each client machine that uses this type of driver. In addition, performance is bridgee to be sub-optimal compared to a dedicated, native “Type 4” driver. The other implication is that any application using a type 1 driver is non-portable given the binding between the driver and platform.

Disadvantages It increases the complexity because at middleware we develop the database coding. In addition, since this driver is a FAT client with natively compiled code. Type 4 drivers are completely written in JAVA.

Advantages and Disadvantages of Jdbc

That C library is ljmitations of the Oracle server process and communicates directly with the internal SQL engine inside Oracle. This article may be too technical for most readers to understand. This article may require cleanup to meet Wikipedia’s quality standards. The distinctive characteristic of type 2 jdbc drivers are that Type 2 drivers convert JDBC calls into database-specific calls i.


This differs from the type 4 driver in that the jddbc-odbc conversion logic resides not at the client, but in the middle-tier. The only point we wanted to highlight is the way the SQL State code structure is. Thin driver Pure Java driver Type 1: Unlike the type 1 and 2 drivers, it does not need associated software to work.

About Java Database Connectivity (JDBC) (About Database Adapters)

It is a Type 4 driver. This type of driver is very flexible that is a single driver can actually provide access ,imitations multiple databases. In order to created the connection object we need to give the URL where the database is located with proper credentials. First the DriverManager tries to use each driver in the order it was registered.

Since the Bridge driver is not written fully in Java, Type 1 drivers are not portable. The first two characters define the class of the state and the three characters later define subclass of the error code.

The implementation class name for this type of driver is com. NullPointerException will be thrown.

JDBC Driver Types

As the database protocol is vendor specific, the JDBC client requires separate drivers, usually vendor supplied, to connect to different types of databases. December Learn how and when to remove this template message.


Retrieved from ” https: This driver is used internally within the Oracle database, and it offers the same functionality as the JDBC Thin client-side driver, but runs inside an Oracle database and is used to access remote databases. This allows your Java code to run on the server to access the underlying database in the fastest possible manner. This driver uses Java native methods to call entrypoints in an underlying C library.

Thus the performance is considerably improved. The driver is platform-dependent as it makes use of ODBC which in turn depends on native libraries of the operating system.

The Network protocol driver uses the three-tier model. Below is the code snippet for the same. This driver communicates directly with the jdbc-kdbc server.

It depends on the number of databases the middleware has been configured to support. Above shows a small table section for the error code i.

Author: admin