sqljdbc : JDBC driver sqljdbc.jar Vs sqljdbc4.jar
Asked Answered
M

2

9

I have a query regarding the jars sqljdbc.jar and sqljdbc4.jar which are used to connect to MS SQL Server 2005 for the systems where the JDK version 1.5 & 1.6 respectively. Now I would like to know, how these jars interpret the column whose datatype is 'XML' in one of the DB table in MS SQL Server 2005, when trying to access from both the systems where the JDK versions are 1.5 & 1.6 using sqljdbc.jar & sqljdbc4.jar respectively?

Is there any difference in interpreting the XML data type using sqljdbc.jar and sqljdbc4.jar?

Thank you very much in advance,

Regards, Laaksha

Majesty answered 28/9, 2011 at 10:15 Comment(0)
L
9

From http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/8c1721c1-781f-4ad0-b656-a2494f3c3978: "These two class libraries are used to support different scenarios. The sqljdbc.jar class library provides support for JDBC 3.0 and the sqljdbc4.jar class library provides support for JDBC 4.0."

Lashanda answered 24/9, 2012 at 18:44 Comment(0)
L
4

If you are using Java7+, you will need to use sqljdbc4.jar. Using the sqljdbc.jar will result in:

Caused by: java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.7 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
Langille answered 5/11, 2014 at 20:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.