I started off researching with unixODBC but ended up installing odbcinst. Eventually I stumbled upon mdbtools. That solves my problem. After installating mdbtools on my Ubuntu laptop, I exported the schema
mdb-schema data.mdb > schema.sql
I edited the schema to HSQLDB syntax and created the new database in HSQLDB.
Then, I only need to do
mdb-export -I data.mdb table | sed -e "s/)$/);/" > table.sql
for each of the tables in the MDB file. The sed command is to append a ';' as mdb-export doesn't end the insert statements with ';'.
I then edit the INSERT statements and run them in HSQLDB.
This is simpler than most of the other approaches I have read on the web.
No comments:
Post a Comment