title: Got error while I'm tried to connect database
body: <p>Got error while I'm tried to connect SQL database
  using cmd. Here is my program.I use jdk 6 version to compile and run
  Thanks in Advance.</p>
  <pre><code>import java.io.*;
  import java.sql.*;
  
  class Dbs
  {
     public static void main(String args[]) throws Exception
    {
        try
        {
         Connection con = null;
         Statement s = null;
         ResultSet rs = null;
  
         Class.forName(&quot;sun.jdbc.odbc.JdbcOdbcDriver&quot;);
         String bala = &quot;jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=c:\\ss.mdb&quot;;
  
          con = DriverManager.getConnection(bala,&quot;&quot;,&quot;&quot;);
          s = con.createStatement();
          rs =s.executeQuery(&quot;select * from Table1&quot;);
         
         while(rs.next())
         {
             System.out.println(&quot;Name&quot;+rs.getString(&quot;name&quot;));
             System.out.println(&quot;No&quot;+rs.getString(&quot;num&quot;));
         }
       }
  
       catch(Exception e)
       {
       System.out.print(e);
       }
    }
  }
  </code></pre>
  <p>Error:</p>
  <p><img src="https://i.stack.imgur.com/iQciW.png" alt="enter image description here" /></p>