Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2003-02-28
3
Medium Priority
?
254 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
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

571 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