export/import

Hello,

What is the best strategy to export a database and import it again.
I’m building an invoice system with HSQLDB embedded but when I want to add something extra in the future I don’t want users to loose all their invoices.

Thanks

I assume that you are asking about a backup strategy.

With “embedded databases”, everything is packaged inside one file. the most straightforward way to create a backup is to close the database, then take a copy of the .odb file to a different name/location.


For developing additional functionality, a split solution is really the way to go.

  • If the users share the same data and are connected to network always, use a centralized database server.
  • If each user needs their own copy of the dataset (because the data is individual to the user, or because they will need it offline), install a local database service (on the user’s computer), as part of the application.

With this, the new modules (forms, reports, etc) may be distributed as a new .odb file without touching stored data.

It requires a slightly more elaborate setup than with embedded data, but not beyond what the average user should manage, and once you have it running it is much better protected against accidents.

No really a backup.

Suppose I create an extra report and want to give it to all users who are using the application. They should be able to export all existing invoices and import them back in the updated version with the extra report.

Or is there an other way to take care of this situation?

Suppose I create an extra report and want to give it to all users

@TrippleDelta: Added my suggestion to cater for this situation.

@Keme: Thanks, I’ll look into it. I guess this is indeed the way to go for me.

Apparently not as simple as that. Macros give tons of errors that I still have to look at.

@TrippleDelta: If my answer is not a solution, you should untick “solved” to receive some more attention to your request.