JDBC with SQL Server 7 and Tomcat
Posted on 2002-07-30
I am having problems connecting JSPs to a MS SQL Server 7 database while developing an application on Tomcat (currently in standalone).
Using a Type 1 (JDBC:ODBC bridge) connection is straight forward and works in the NetBeans IDE once the ODBC is set up. When running outside the IDE on Tomcat, the driver class file ("sun.jdbc.odbc.JdbcOdbcDriver") loads OK from the JSP, but I get an error "Data source name not found and no default driver specified".
There would appear to be 2 solutions to this:
1. Get the type 1 connection working correctly. No idea how to set up both the ODBC connection and the data source to be recognised by Tomcat.
2. Go for a type 3 or 4 connection. However, MS only have a jdbc driver for SQL Server 2000 and there is no statement saying that it will work with SQL Server 7. I assume the driver .class or .jar file has to be put in the application WEB-INF folder. Again how do I refer to the datasource from Tomcat?
Looking forward to help on this (been stuck for a couple of days now), which I hope is a relatively straightforward problem.