Jdbc driver with SQL Server
843859Dec 16 2005 — edited Dec 21 2005i have used type 2 driver for connectin to my SQL Server. Its working fine with normal java program. but when i used the same driver in my servlet its returning null pointer exception. i.e. Connection is null
here is the code i have used:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn =DriverManager.getConnection("jdbc:odbc:mydsn",
"username",
"password");