depends by implementations od Java version in Java6 is JDBC v4,
something about that you can find on google
Of course, there are 4 types of JDBC drivers types.These are...
Type1 : JDBC-ODBC Bridge plus ODBC driver (use window's built-in ODBC driver)
Type2 : Native-API partly Java driver (follows two-tier approach)
Type3 : JDBC-Net pure Java driver (follows three-tier approach)
Type4 : Native-protocol pure Java driver (fastest in 4 JDBC drivers types)
The most widely used drivers are Type1 and Type4 while Type2 and Type3 are not. However, Type4 needs different driver for each kind of database. For example, if you use Oracle database, you will need Oracle Driver. Type4 is portable but Type1 is not. In general, We can know what type of drivers are used by looking at driver loading statement and connection establishing statement .......
if you see the following 2 statements, you can know it is Type1 ......
- Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // load the driver
- DriverManager.getConnection("jdbc:odbc:connectionname","username","password"); // Establish connection
if you see the following 2 statements, you can know it is Type4 ......
***** Note : need to add sqljdbc.jar into your java project *************
- DriverManager.getConnection("jdbc:oracle:thin: @localhost:1521: XE","username","password");
***** Note : need to add ojdbc14.jar into your java project ***************
I hope to be more power to you ............ best wishes :):):)
il recommend u to use type 4, for mySql db:
Class.forName("com.mysql.jdbc.Driver"); Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bike","scott","tiger");
you can downloads wamp server to manage yur db, then configure mySql connector, check
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Here is the sample output that I ...
Hello All ...
Iam Getting An Error With try to excecute the stored procedure .
I have Have Sql database , the stored procedure like so :
USE [MPRS] GO /****** Object: StoredProcedure [dbo].[Search_Licenses_By_Number] Script Date: 26-Nov-16 8:06:52 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE ...
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...