JDBC Tutorials - Herong's Tutorial Notes
Dr. Herong Yang, Version 2.11

Microsoft JDBC Driver for SQL Server - sqljdbc.jar

This chapter provides tutorial notes on sqljdbc.jar, JDBC Driver 1.0 produced by Microsoft for SQL Server 2005. Topics include downloading and installing Microsoft JDBC Driver 1.0; loading sqljdbc.jar; creating a connect to SQL Server with port number and database name; closing a connection.

Installing Microsoft JDBC Driver for SQL Server

Loading Driver Class with Class.forName()

DriverManager.getConnection() and Connection URL

Specifying Port Number in Connection URL

Closing the Database Connection - con.close()

Specifying Database Name in Connection URL

Incorrect Database Name in Connection URL

Creating Connections with DataSource Class

Dr. Herong Yang, updated in 2007
Microsoft JDBC Driver for SQL Server - sqljdbc.jar