Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC for reading MDB file

 
John Spear
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to read an MDB file using JDBC api. However dint find anything yet. Could anyone provide any links or suggestions or guide somehow?

HOWTOREAD_INTERPRET:JDBC api for reading via an MDB file

Any kind of help is appreciated.

Regards,
John
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John,
Welcome to CodeRanch!

Take a look at this thread. Does it answer your question? Or give you a more specific question to ask here?
 
John Spear
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne,

The link you provided is for Linux version not supporting the odbc.

However the environment i have been working on is Java 7 on Windows 7 64 bit ,and the error i am getting while using the same is pasted below-

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

code snippet for a reference-
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String database = "jdbcdbcRIVER={Microsoft Access Driver (*.mdb)};DBQ=/home/sample.mdb";

Appreciate your advise again .
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to http://www.coderanch.com/how-to/java/OdbcJdbcQuestions, you need to use a slightly different DB URL for 64-bit Java.
 
John Spear
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf for the reply!


The code is again giving the same error as pasted below-
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Appreciate your response.

Regards,
John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic