?
Solved

jdbc to database have 4 ways ,but which way is about this code ?

Posted on 2003-02-28
3
Medium Priority
?
240 Views
Last Modified: 2010-03-31
1 jdbc-odbc bridge
2 jdbc native bridge
3 jdbc-network bridge
4 pure java jdbc drive

this code :
try
{
Connection con;
Statement stmt;
ResultSet rs;
Class.forName("oracle.jdbc.driver.OracleDriver");
String url="jdbc:oracle:thin:@192.168.0.1:1521:erdos";
con=DriverManager.getConnection(url, "system", "manager");
stmt = con.createStatement();
......

at this code ,we can see it use first or second or  way ?
to connect to the database ?
0
Comment
Question by:handsome1234
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 8042752
your code is using a type 4 driver
0
 
LVL 3

Accepted Solution

by:
NetWize earned 150 total points
ID: 8043548
you can rule out 1, because that would probably use the url jdbc:odbc for connection
it's not two because you didn't have to install a native library on the client

But I don't think you can say wether it's a 3 or 4 because they are (from a client point of view) pretty much the same.
To distinguish between them you'd have to know what happens at the server. (At least that is what I remember from the various DB2 drivers I tried)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 8044819
the oracle thin driver is type 4
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question