Working with Type 3 Driver

Working with Type 3 Driver

In this tutorial, we are going to discuss about Working With Type 3 Driver. The Type 3 JDBC driver, also known as the Network Protocol Driver or Middleware Driver, operates by translating JDBC calls into a vendor-independent network protocol.

Working with Type 3 Driver

Here an extra activity in Type-3 Driver is we have to install Middleware Server.

E.g

IDS Server (Internet Database Access Server).

How to install IDS Server?

idssoftware.com âž” Download âž” IDS Server Trial âž” 
IDS Server 4.2.2 Lite Evaluation âž” Windows (2008/2003/XP/2000/NT)

Download and Install IDS Server. We have to set Driver Software in the Class Path. For this the following Jar File should be placed in the Class Path. 

Driver Class Name : ids.sql.IDSDriver
JDBC URL : jdbc:ids://localhost:12/conn?dsn=mysysdsn

Internally IDS Server will use Type-1 Driver to communicate with Database. For this we have to configure “System DSN” and we have to choose “Oracle In XE”.

import java.sql.*;
/**
 * 
 * @author ashok.mariyala
 *
 */
public class Type3DbConnectDemo { 
   public static void main(String[] args) throws Exception { 
      Class.forName("ids.sql.IDSDriver"); 
      Connection con=DriverManager.getConnection("dbc:ids://localhost:12/conn?dsn=mysysdsn","scott","tiger"); 
      Statement st = con.createStatement();
      ResultSet rs = st.executeQuery("select * from emp");
      while(rs.next()) {
         System.out.println(rs.getInt(1)+"\t"+rs.getString(2)+"\t"+rs.getInt(3)+"\t"+rs.getString(4));
      }
      con.close();
   }
}

That’s all about the Working With Type 3 Driver in JDBC. If you have any queries or feedback, please write us email at contact@waytoeasylearn.com. Enjoy learning, Enjoy Java.!!

Working with Type 3 Driver
Scroll to top