aspose file tools
The moose likes JDBC and the fly likes How to automate creation of MSAccess Database? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "How to automate creation of MSAccess Database?" Watch "How to automate creation of MSAccess Database?" New topic
Author

How to automate creation of MSAccess Database?

Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 359
I've noticed that some of the archetypes for maven will automagically create a new database and table and run some dbunit tests.

I would like to automate the creation of MSAccess databases. I think the only ways to do it are
(1) Call native code via JNI (a windows only approach) or,
(2) Encode the binary contents of an empty msaccess database as java source code (maybe a long byte array?) and recreate such a file as needed. Does anyone have a utility that will already take an existing binary file and encode it as java source code? Assuming the answer is no, how would I write such a beast?

Thanks,
Siegfried
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35246
    
    7
The http://jackcess.sourceforge.net/ library can create, read and write .mdb files, so it may be what you're looking for.


Android appsImageJ pluginsJava web charts
Siamak Saarmann
Ranch Hand

Joined: Aug 21, 2004
Posts: 77
Ulf,

Do you know how stable is this library?

I have a simulation software with a lot of settings file. I want to get rid of these files and I was looking for a simple and single file database with very basic SQL queries which also works under Windows/Linux. I have very few queries.

Do you suggest this library for my requirements?

Thank you for your time.


PhD Candidate: Distributed and Parallel Systems, Simulation and Modeling
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35246
    
    7
Using this library -with which I have no experience whatsoever- only makes sense if you NEED an Access database. If -as you mention- cross-platform functionality is desirable it's not a good choice, because using Access limits you to Windows. (Also note that Jackcess can only read and write MDB files, not query them.) I'd probably use HSQLDB in your case.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to automate creation of MSAccess Database?
 
Similar Threads
Remote Desktop Login
JDBC
Java with XML -- help urgent
How to create a Database?
JDBC