• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

read data from MS Access db file in UNIX, using JAVA

 
premchand chand
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a requirement to read data from MS Access db file in UNIX, using JAVA.

Could someone provide any pointer how to go about it?



I was trying to use the below but was failing on UNIX:



Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

String database = "jdbcdbcriver={Microsoft Access Driver (*.mdb)};DBQ=";

database += this.fileName.trim() + ";DriverID=22;READONLY=true}";

this.con = DriverManager.getConnection(database ,"","");

this.stmt = this.con.createStatement();


 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unix/Linux does not support ODBC out of the box; see http://www.unixodbc.org/ for how to get it working.

Alternatively, a type 4 driver for Access is available: http://www.hxtt.com/access.html

If you don't require JDBC, check out the Jackcess library on SourceForge.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic