Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Type 4

 
Rajarsi Ghosh
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

Where will i find a type 4 driver and how to use it. I have used type 1 driver till date. Can anybody let me know in details about how to use the type 4 driver also where i will get this driver.

regards
Rajarsi
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15284
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JDBC driver types.

Type 1 is the JDBC-ODBC bridge driver.

What database are you using? You need a driver for your particular database. For most databases, type 4 drivers are available (for example the Oracle thin driver, for MySQL, etc.).
 
Rajarsi Ghosh
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Oracle 9i database.
 
naidu gulla
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
type 4 is nothing but thin driver
ifyou use oracle
the same procedure difference use
u have to use the following driver
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbcracle:thin:@localhost:1521rcl","scott","tiger");


ok any questions u can
 
Rajarsi Ghosh
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am getting the following error:

java.sql.SQLException: Io exception: The Network Adapter could not establish the connection

I used the following piece of code:
============================================================
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con= DriverManager.getConnection("jdbcracle:thin:@connectionstring:1521rcl","username","password");

============================================================
where connectionstring is the connection string of the Oracle 9i database and username and password are Oracle userid and password.

Can anybody tell me where i am going wrong.

regards
Rajarsi
[ July 25, 2006: Message edited by: Rajarsi Ghosh ]
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Even i had faced the same problem..Dont remember exactly what i did...
but try to set the classpath.

Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic