How to read MDB file in java
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: How to read MDB file in java

  1. #1
    Join Date
    Mar 2014

    How to read MDB file in java

    i want read a (.accdb) file and i approached by this way .Below is code but i am getting this error-- java.lang.NullPointerException
    package mdb;

    import java.util.Map;

    import com.healthmarketscience.jackcess.Database;
    import com.healthmarketscience.jackcess.Table;
    import com.healthmarketscience.jackcess.query.Query.Row;
    import mdb.DatabaseBuilder;

    public class Readwritemdb {

    public static void main(String[] args) throws IOException {
    try {
    String path="D:\\Anand\\mymdb.accdb";
    Database db = File(path));
    Table table = db.getTable("ContractInfo");

    for(Map row : table) {
    System.out.println("Column 'a' has value: " + row.get("a"));

    } catch (IOException e) {




    please help

  2. #2
    Join Date
    Jun 1999
    SW Missouri

    Re: How to read MDB file in java

    What variable has the null value? Look at the error message for the line number for where the error happens, then look at the line and find the variable, then backtrack in the code to find out why that variable does not have a valid value.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center