Connecting SQL SERVER 2008 with TOMCAT 7

User Generated

znqql09

Programming

Description

Hello everyone
I am stuck with a new problem.I want to use SQL SERVER 2008 as the database in my Servlet project but don't know how to configure it.Any type for connection may be useful either by a datasource or by Sql Server Driver .
knodly help !!!!

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

you can use JDBC connection

String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
Class.forName(driver);
String url = "jdbc:microsoft:sqlserver://host:1433/database";
Connection conn = DriverManager.getConnection(url, "username", "password");


Anonymous
Great content here. Definitely a returning customer.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags