File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC 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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
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: 15286

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

GenRocket - A Test Data Generation Platform
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
Similar Threads
Configuring Tomcat5.0 for HTTPS
Tomcat 5.0 and HTTPS
using HTTPS
problem using thin driver
Oracle Jdbc Thin Drivers