0

In our deployment chain we compress the access-database before sending it to the user.

As there where some troubles we want to decompile it too.

But unfortunately decompiling (as described here: How does one decompile and recompile a database application? ) seems to require to start/open the database.

As we deploy very frequently, I am searching for a way to decompile the database without opening/starting it.

Gener4tor
  • 414
  • 3
  • 12
  • 40
  • Afaik you can't. You can make it immediately execute a macro that causes the database to close, though. – Erik A Aug 12 '19 at 10:13
  • Also, consider that if you're decompiling, you probably want to do more than just that. In our routine, we normally 1) close all module windows, 2) compile the code, 3) save the VBA project, 4) compact & repair the project then it's ready to distribute. I am not sure there's much utility in decompiling alone without the other steps. – this Aug 12 '19 at 11:22
  • @this: As described, wo also compress (= compact and repair) the database. I think we compile it too. The closing is done by the autostart macro. Only decompile is missing. – Gener4tor Aug 12 '19 at 11:36
  • Right but what I'm suggesting is that you set up a script that decompiles the database, then use Access automation via `GetObject` to do the rest of steps for you. Then it can also close the application without having to add a macro to the database to do that for you. – this Aug 12 '19 at 11:38
  • 1
    Note that I recommend for deploying an uncompiled database. That way, it will compile when needed using the libraries present on the host, and that can avoid issues. Having a _compile_ step in your deployment process can be useful to check there are no issues when compiling, but that should generally be done before deployment. Personally, I deploy using a versioning script that splits the database in parts (tables, queries, forms, references, modules) then integrates the parts on installation. This is mainly to allow users to integrate their own parts across versions, but has proven reliable. – Erik A Aug 12 '19 at 12:32
  • What is wrong with starting/opening database? After clicking to open, you should be holding `SHIFT` key to suppress all automation before decompiling. – Parfait Aug 12 '19 at 17:48

1 Answers1

1

Don't believe that you can de-compile without launching the application. (even from command line). The only possible approach would be to create a blank database and import everything. This I suppose could be automated, and the result would be a database that not been compiled. So, a import of all objects into a new blank database is a "possible" solution, but it would involve code to transfer objects into that new blank database. Not likely worth the effort, but is a possible. And one could also consider the save-as text to export all objects into a text file, and then re-build a new solution based on those text files (this is how source code control works with access, and thus even building from a GIT repository is possible).

Albert D. Kallal
  • 42,205
  • 3
  • 34
  • 51