你的错误信息呢?要么用以下的jsp例子做一下测试。
http://www.csdn.net/expert/topic/670/670716.xml?temp=.3571741

解决方案 »

  1.   

    检查一下String DBDriver="com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String ConnStr="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=web";
    我觉得应该是ConnStr="jdbc:microsoft:sqlserver://localhost:1433?DatabaseName='web'";
      

  2.   

    错误信息是:
    Internal Servlet Error:javax.servlet.ServletException
    Root cause: java.lang.NullPointerException
      

  3.   

    我得没问题
        String sDB="com.microsoft.jdbc.sqlserver.SQLServerDriver";
        String sCon="jdbc:microsoft:sqlserver://112.204.13.246:1433;user=sa;password=***;DatabaseName=summer";   //连接到ODBC
        Connection conn=null;
        private Statement stmt = null;
        private PreparedStatement prepstmt = null;
        //private ResultSet rs=null;    public Database() throws Exception
        {
            Class.forName(sDB);
            conn = DriverManager.getConnection(sCon);
            stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
        }
      

  4.   


    http://www.csdn.net/expert/topic/989/989300.xml?temp=.2207147