This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC for reading MDB file

 
John Spear
Greenhorn
Posts: 3
  • 0
  • 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: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • 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
  • 0
  • 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
Pie
Posts: 42966
73
  • 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
  • 0
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic