• 博客(0)
  • 资源 (2)

空空如也

sql jdbc 2.0.1607.1 UNIX

Using the sqljdbc.jar class library, applications must first register the driver as follows: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); When the driver is loaded, you can establish a connection by using a connection URL and the getConnection method of the DriverManager class: String connectionUrl = "jdbc:sqlserver://localhost:1433;" + "databaseName=AdventureWorks;user=MyUserName;password=*****;"; Connection con = DriverManager.getConnection(connectionUrl); In the JDBC API 4.0, the DriverManager.getConnection method is enhanced to load JDBC drivers automatically. Therefore, applications do not need to call the Class.forName method to register or load the driver when using the sqljdbc4.jar class library. When the getConnection method of the DriverManager class is called, an appropriate driver is located from the set of registered JDBC drivers. sqljdbc4.jar file includes "META-INF/services/java.sql.Driver" file, which contains the com.microsoft.sqlserver.jdbc.SQLServerDriver as a registered driver. The existing applications, which currently load the drivers by using the Class.forName method, will continue to work without modification. Note: sqljdbc4.jar class library requires a Java Runtime Environment (JRE) of version 6.0 or later.

2009-02-17

sql jdbc 2.0

Using the sqljdbc.jar class library, applications must first register the driver as follows: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); When the driver is loaded, you can establish a connection by using a connection URL and the getConnection method of the DriverManager class: String connectionUrl = "jdbc:sqlserver://localhost:1433;" + "databaseName=AdventureWorks;user=MyUserName;password=*****;"; Connection con = DriverManager.getConnection(connectionUrl); In the JDBC API 4.0, the DriverManager.getConnection method is enhanced to load JDBC drivers automatically. Therefore, applications do not need to call the Class.forName method to register or load the driver when using the sqljdbc4.jar class library. When the getConnection method of the DriverManager class is called, an appropriate driver is located from the set of registered JDBC drivers. sqljdbc4.jar file includes "META-INF/services/java.sql.Driver" file, which contains the com.microsoft.sqlserver.jdbc.SQLServerDriver as a registered driver. The existing applications, which currently load the drivers by using the Class.forName method, will continue to work without modification. Note: sqljdbc4.jar class library requires a Java Runtime Environment (JRE) of version 6.0 or later.

2009-02-17

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除