Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

ms access - How does one decompile and recompile a database application?

I have an Access database application and I would like to know the proper way of decompiling and recompiling it.

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To Decompile an Access database you'll need to create a shortcut with the following elements:

  1. Path to the MS Access Executable (MSACESS.exe)
  2. Path to the database you would like to decompile
  3. The /decompile flag

All together, then, the shortcut would look something like the following:

"C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" "C:usersimdocumentsMydatabase.mdb" /decompile

Obviously, the paths will be different on your system.

I'd recommend making a backup of your database before running this command.

If you have any startup code in your database you should hold down the shift key to bypass the startup code execution.

Once the database opens, you can compact and repair the database to ensure optimal performance.

After the compact and repair, you can recompile the VBA code by opening any module and using the Debug Compile [DatabaseName] command.

If this is something you want to do frequently, you can create an "Access Decompile" shortcut in your SendTo Menu. Once you have this shortcut in the SendTo Menu you'll be able to right-click on any Access database and select "Send To --> Access Decompile", which is much easier than having to create a shortcut to the specific database.

Follow these steps to customize the Send To menu with an Access Decompile shortcut

  1. Create a shortcut to the Access executable.

  2. Append the /decompile flag in the Target for the shortcut. The shortcut will look like this:

    "C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" /decompile

  3. Open Windows Explorer and paste the following into the address bar:

    %APPDATA%MicrosoftWindowsSendTo

  4. Copy the shortcut you created into the SendTo Folder.

  5. The Access Decompile Shortcut will now be available for use.

To invoke the Access Decompile shortcut, right click on an Access Database in Windows Explorer and select "Send To --> Access Decompile". Be sure to hold the shift key down to bypass any startup code in the database.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...