the following two lines of code work well in that they create test.mdb, and also create and populate table aaa.
Database db = Database.create(new File("test.mdb"));
Database.open(new File("test.mdb")).importFile("aaa", new File("aa.TXT"), "\t");
My problem is I then need to retrieve the information from table aaa, on processing the next line x results in null.
Table x = db.getTable("aaa");
Is there a simple way of getting around this?
Much Appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Hopefully a simple one,
the following two lines of code work well in that they create test.mdb, and also create and populate table aaa.
Database db = Database.create(new File("test.mdb"));
Database.open(new File("test.mdb")).importFile("aaa", new File("aa.TXT"), "\t");
My problem is I then need to retrieve the information from table aaa, on processing the next line x results in null.
Table x = db.getTable("aaa");
Is there a simple way of getting around this?
Much Appreciated.
the problem is that you are using two different handles to the database. you open one on the first line and one on the second. change line 2 to:
db.importFile("aaa", new File("aa.TXT"), "\t")
Thanks You!
It works great.