Use JDBC To Connect Microsoft SQL Server

This article will tell you how to connect Microsoft SQL Server use JDBC. You can access Sql Server use JDBC with following two methods. Use com.microsoft.sqlserver.jdbc.SQLServerDataSource java object. SQLServerDataSource sqlDs = new SQLServerDataSource(); // Use window integrate authentication. //sqlDs.setIntegratedSecurity(true); /* Use sql server account authentication.*/ sqlDs.setIntegratedSecurity(false); sqlDs.setUser(“sa”); sqlDs.setPassword(“sa”); // Set ds server name or ip. …

Use JDBC To Connect Microsoft SQL Server Read More »