GeeCON Prague 2014*
The moose likes JDBC and the fly likes JDBC for reading MDB file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC for reading MDB file" Watch "JDBC for reading MDB file" New topic
Author

JDBC for reading MDB file

John Spear
Greenhorn

Joined: Jan 17, 2014
Posts: 3
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

Joined: May 26, 2003
Posts: 30580
    
154

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?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
John Spear
Greenhorn

Joined: Jan 17, 2014
Posts: 3
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
Marshal

Joined: Mar 22, 2005
Posts: 42024
    
  64
According to http://www.coderanch.com/how-to/java/OdbcJdbcQuestions, you need to use a slightly different DB URL for 64-bit Java.


Ping & DNS - my free Android networking tools app
John Spear
Greenhorn

Joined: Jan 17, 2014
Posts: 3
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JDBC for reading MDB file