This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes SQLServer thindriver for Tomcat5.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQLServer thindriver for Tomcat5.0" Watch "SQLServer thindriver for Tomcat5.0" New topic

SQLServer thindriver for Tomcat5.0

Nilesh Chokhadia

Joined: Sep 12, 2003
Posts: 10
In tomcat5.0 server.xml file we have thindriver for oracle,My-sql but we dont have for SQLServer from where I got thin driver and how to configure that driver in server.xml as well as in source code for Database connectivity with same thin sqlserver driver
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

You can get a MS SQL Server thin Driver here, or you can use the Sun JDBC Driver search to find other Drivers.
You don't need to make any changes to the server.xml, you just need to change the class loaded in your Class.forName() line to the MS Driver, change the dtabaase URL to refer to your database, and place the JDBC JARs in the WEB-INF/lib directory for the web application.
Any JDBC sample code will show you how to connect, you just have to change the two parts listed above.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

FYI - MS SQL JDBC Driver only supports the JDBC 2.0 spec. So be careful when you code.

GenRocket - Experts at Building Test Data
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

I believe there are other Type-4 SQL Server Drivers (two that I've heard of, none that I've used), check the Driver search page.
I agree. Here's the link:
subject: SQLServer thindriver for Tomcat5.0
It's not a secret anymore!