• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SQL EXCEPTION

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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("jdbc:odbc: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 ...
 
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic