View Javadoc

1   /*
2    * 
3    * 
4    */
5   package oscon2006.hello;
6   
7   import com.healthmarketscience.jackcess.*;
8   import java.io.*;
9   import java.util.*;
10  
11  public class HelloJackcess
12  {
13  
14  	public static void main(String[] args) throws Exception
15  	{
16  		Database db = Database.open(new File("cars.mdb"));
17  		for (String tname: db.getTableNames())
18  		{
19  			Table t = db.getTable(tname);
20  			Map<String, Object> row;
21  
22  		    while ((row = t.getNextRow()) != null)
23  		    {
24  		        for (String colName : row.keySet())
25  		        {
26  		            System.out.println(row.get(colName));
27  		        }
28  		    }
29  		}
30  		db.close();
31  
32  	}
33  
34  }