title: How to resolve [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
body: <p>I tried to make a connection with Access but I encountered the following problem after compiling my Java file</p>
  
  <blockquote>
    <p>[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified</p>
  </blockquote>
  
  <p>my code is :</p>
  
  <pre><code>import java.sql.*;
  
  public class abc
             {
              public static void main(String args[])
              {
  
               try 
                  {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   String fn="C:/ctb/new";
                   String database = "jdbc:odbc:Driver={Microsoft Access Driver                 (*.mdb,*.accdb)};DBQ="+fn+".accdb;";
                   Connection conn = DriverManager.getConnection(database); 
           System.out.println(conn);
  
  
                   }
              catch(Exception e)
                   {
                    e.printStackTrace();
                    System.out.println("Error!");
                   }
             }
       }
  </code></pre>