• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL EXCEPTION

 
sangeeth kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable()
{
public void run()
{

Connection con;
Statement st;
ResultSet rs;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbcdbc:pay");
st=con.createStatement();
rs=st.executeQuery("SELECT userid from Table1");

}
catch(ClassNotFoundException e)
{
System.out.println("CNFE");
}
catch(SQLException e)
{
System.out.println("SQL ERROR"+e.getMessage());
e.printStackTrace();

}
}
});
}

---------------------------------------------------------------------------------------------------
I got this Exception .

SQL ERROR[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
java.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6964)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7121)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3080)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)



Give me solution . Thanks in Advance ...
 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A google search for this exception could help you -
Here is one of the similar problem with possible resolution -
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/702f0d9b-6cb9-49cf-9953-80d059711e60/the-specified-dsn-contains-an-architecture-mismatch-between-the-driver-and-application
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic