Hi.
I am not able to load the driver for MSSQL2000 server, even I have put all 3
jar files, mssqlserver.jar, msutil.jar, msbase.jar in lib folder and have
tried to restart the tomcat.
I got ClassNotFoundException. How should I set the Class.forName?
My code,
public DBConnect(String host, String dbname, String username, String
password)
{
//Load Drv
try
{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
} catch(ClassNotFoundException cnfe) {
System.err.println(cnfe);
}
//Define the connection
msSqlURL = "jdbc:odbc:" + dbname;
}
Arne Vajhøj - 05 May 2008 13:10 GMT
> I am not able to load the driver for MSSQL2000 server, even I have put all 3
> jar files, mssqlserver.jar, msutil.jar, msbase.jar in lib folder and have
[quoted text clipped - 9 lines]
> {
> Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Try:
com.microsoft.jdbc.sqlserver.SQLServerDriver
for 2000 (the one you use are for 2005).
Arne