A program to retrive records from database
import java.sql.*;
import javax.sql.*;
public class Database
{
public static void main(String a\[\])
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection cn =DriverManager.getConnection("jdbc:odbc:data");
Statement st=cn.createStatement();
ResultSet rs= st.executeQuery("select * from student ");
while(rs.next())
{
int r=rs.getInt(1);
String n= rs.getString(2);
int m=rs.getInt(3);
System.out.println("Roll Name Marks");
System.out.println(r+" "+n+" "+m);
}
cn.close();
}
catch(Exception e)
{
}
}
}][1]
I am running 64 bit Windows 7 Created the DSN from sysWOW64 folder Have a database consisting of 3 fields Roll Name Mark After Compiling no errors are found Executing the program results in no Output Why I am not able to Execute the program
![At command line no output][1]
Edit from comments
The exception I am getting is
SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application