File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes JDBC connection to MS SQL Server .. HELP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC connection to MS SQL Server .. HELP" Watch "JDBC connection to MS SQL Server .. HELP" New topic

JDBC connection to MS SQL Server .. HELP


Joined: Sep 17, 2002
Posts: 6
Hello JAVA Whizs...
I am new to working together with JAVA and MS SQL Server.
Can anyone tell me how well JAVA goes with
MS SQL server?
What I need to do is to setup a JDBC connection from my JAVA servlet to
access MS SQL Server database.
Can anyone tell me the sample code required for
achieving my goal.
Thanks a lot,
Graham Thorpe
Ranch Hand

Joined: Mar 25, 2002
Posts: 265
Its simple and easy too.How u connect to oracle to java same like this u can connect sql too.But u need to download ms sql driver then u can try it ..
Piyush Daiya
Ranch Hand

Joined: Jun 13, 2002
Posts: 67

You can find the list of jdbc drivers for MS SQL server available on
or you can download jdbc driver from microsoft
and for sample code;EN-US;Q313100&

Hope, this helps out.

"A scientist is not person who gives right answers but a person who asks right questions"
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements.
I agree. Here's the link:
subject: JDBC connection to MS SQL Server .. HELP
jQuery in Action, 3rd edition