moaz.amin.37 -12 Junior Poster

i have a problem in JDBC every thing is ok it shows this message
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver i already create DSN but but it stil show this error i do not know what i do
My jdk is 64 bit and i create DSN of odbc 32 bit is any problem is here that jdk is 64 bit and odbc is 32 bit
my code is here

import java.sql.*;
class FirstJDBC{

    public static void main(String s[]){


            String url="jdbc:odbc:personDSN";
            Connection con=DriverManager.getConnection(url);
            Statement st=con.createStatement();
            String q="SELECT * FROM Person";
            ResultSet rs=st.executeQuery(q);

                String name=rs.getString("name");
                String add=rs.getString("address");
                String pNum=rs.getString("phoneNum");
        }catch(Exception e){



please help me

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.