• 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

JDBC problems using Servlets

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I'm using Servlet and MS access as database I'm having some problems......(but using a direct JDBC program and MS access as database it works fine )
I get the following error msg in browser ......
The error msg is : the specified dsn contains an architecture mismatch between the driver and application
If I dont use DSN then: [Microsoft][ODBC Microsoft Access Driver] Disk or network error.
Please help.......I use window 7 64-bit
and MS Access 2010
 
Ranch Hand
Posts: 312
MS IE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe you are using 64-bit JVM. Also, MS-Access is extended from standard RDBMS by MS and hence may not be able to support multiple simultaneous connections from a Servlet. You should always create a DSN to access any MicroSoft RDBMS (such as SQL Server).
 
rahul markonda
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for reply.
Yes the JVM is also 64 bit . But I'm not using any multiple connections at the same time. I was just trying to access it from servlet i.e., from browser. I also am using DSN created for Microsoft access......
When I set a dsn by the name 'mydsn' for MS Access......

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");------Line 7
Connection con = DriverManager.getConnection("jdbc:odbc:mydsn","","");--------Line 8

Line 7 compiles and runs
but Line 8 is the one which causes the error:
[ODBC Microsoft Access Driver] The specified dsn contains an architecture mismatch between the driver and application
Do you think i should download any driver?
Thank you........
 
Madhan Sundararajan Devaki
Ranch Hand
Posts: 312
MS IE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Servlets are multi-threaded and in this case has requested multiple connections.

As you are using Windows7 64-bit, the ODBC driver is compliant.
 
rahul markonda
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you.
Can you please send me the link to the driver?
Or please attach it to this message.
I did a lot of research in internet but still could not find the right ODBC driver.
reply
    Bookmark Topic Watch Topic
  • New Topic