title: NetBeans + Microsoft SQL Server 2012 jbdc drivers
body: <p>I am trying to resolve problem: "java.lang.ClassNotFoundException: com.microsoft.sqlserver.jbdc.SQLServerDriver"</p>
  
  <p>Actually what is my problem..whether is it a class path error or program error or by missing of library files.</p>
  
  <p>//below is my code</p>
  
  <pre><code>    package projektsql;
  
  /**
   *C:\ProgramFiles\MicrosoftJDBCDriver4.0forSQLServer\sqljdbc_4.0\enu\sqljdbc4
   * @author m4rtin77
   * intergratedSecurity=true;
   */
  import java.sql.*;
  import javax.swing.*;
  public class ProjektSQL {
      Connection conn = null;
      public static Connection ConnectDB(){
          try{
              Class.forName("com.microsoft.sqlserver.jbdc.SQLServerDriver");
              String connstring = "jdbc:sqlserver://localhost:1433;databaseName=JavaSQLProjekt;intergratedSecurity=true;";
  
  
  
              Connection conn = DriverManager.getConnection(connstring);
                JOptionPane.showMessageDialog(null, "Polaczono:");       
  
  
              return conn;
  
  
          }catch(Exception e){
              e.printStackTrace();
              return null;
          }  
      }
  }
  </code></pre>
  
  <p>And one method in Jframe:</p>
  
  <pre><code>private void formWindowOpened(java.awt.event.WindowEvent evt) {                                  
          conn = ProjektSQL.ConnectDB();
  </code></pre>
  
  <p>I really dont know what is gonna out there.</p>