473,836 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Decompiling an A97 mdb file...

MLH
Can decompiling an A97 mdb result in fixing minor nasties that may be
responsible for some premature terminations of A97 (We are sorry. MS
Access 97 needs to close.... messages). I've found the following
recommendation and was wondering if any of you have used the
technique and why you did?

To decompile start Access with the /decompile switch. To do this from
windows do a Start, Run and then where it asks for the name of the
program to run type:
"c:\program files\microsoft office\office\m saccess.exe" /decompile
Make sure you include the quotes as above. Also modify the file path
if necessary to point to where msacess.exe is located (if it is
different in your installation). When Access starts select/open the
mdb you want to decompile. (the first mdb you open after starting
Access in this fashion will get decompiled). Then compact the
database (tools, Database Utilities, Compact and Repair). Then open
up any module and do a menu Debug, Compile. Then close the module.
Then compact the database again.
Feb 15 '06 #1
6 3325
Yes, decompile is a useful technique to solve a particular kind of
corruption with Access databases.

An MDB contains 2 copies of your VBA code:
- the text version (what you read and edit);
- the code version (what actually executes).

Under certain circumstances, these 2 can get out of sync, so that what is
running does not match the code you are viewing. A decompile instructs
Access to discard the compiled version. Then when you start the database
again, it recreates the compiled version out of the text, and the sync
problems are gone.

It is always good practice to back up before a decompile. If it were the
text copy that was damaged, a decompile could make things worse. In practice
this is rare (especially as you can see the problem in the text version.)
You probably want to compact immediatedly after a decompile to regain the
space that was occupied by the compiled code.

As to what causes this kind of corruption, without evidence I suspect that
editing a module while it is executing (i.e. in break mode) is a
contributing factor. When you begin editing, Access creates another temp
copy of the form and its module (so you can revert to the saved copy.) It is
now trying to balance 4 copies of the code. If this happens while the form
is open (not in design view) and the code is running, it appears that Access
gets confused between the different copies. The only evidence I have for
this is circumstantial, i.e. electing to always switch to design view before
editing prevented about 2/3 of the corruptions of this type that I
experienced.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MLH" <CR**@NorthStat e.net> wrote in message
news:so******** *************** *********@4ax.c om...
Can decompiling an A97 mdb result in fixing minor nasties that may be
responsible for some premature terminations of A97 (We are sorry. MS
Access 97 needs to close.... messages). I've found the following
recommendation and was wondering if any of you have used the
technique and why you did?

To decompile start Access with the /decompile switch. To do this from
windows do a Start, Run and then where it asks for the name of the
program to run type:
"c:\program files\microsoft office\office\m saccess.exe" /decompile
Make sure you include the quotes as above. Also modify the file path
if necessary to point to where msacess.exe is located (if it is
different in your installation). When Access starts select/open the
mdb you want to decompile. (the first mdb you open after starting
Access in this fashion will get decompiled). Then compact the
database (tools, Database Utilities, Compact and Repair). Then open
up any module and do a menu Debug, Compile. Then close the module.
Then compact the database again.

Feb 15 '06 #2
I have but I do not.
Because I saveastext and (re) loadfromtext all my objects and I believe
this practice is superior to decompiling in cleaning out extraneous
crud and identifying errors.

The recommendation you quote is inefficient.

Feb 15 '06 #3
Allen Browne wrote:
Yes, decompile is a useful technique to solve a particular kind of
corruption with Access databases.


Not related to MLH's question, but I've found that in A2003 it's almost
mandatory to do this now and then druing development as bloat is so severe.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Feb 15 '06 #4
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in
news:43******** *************** @per-qv1-newsreader-01.iinet.net.au :
As to what causes this kind of corruption, without evidence I
suspect that editing a module while it is executing (i.e. in break
mode) is a contributing factor. . . .
I do this all the time in A97 and never experience corruption.

I think the biggest cause of code corruption is not turning off
COMPILE ON DEMAND.
. . . When you begin editing, Access creates another temp
copy of the form and its module (so you can revert to the saved
copy.) It is now trying to balance 4 copies of the code. If this
happens while the form is open (not in design view) and the code
is running, it appears that Access gets confused between the
different copies. The only evidence I have for this is
circumstantial, i.e. electing to always switch to design view
before editing prevented about 2/3 of the corruptions of this type
that I experienced.


I've never seen this kind of problem in A97.

But I always run with COMPILE ON DEMAND turned off, and decompile on
a regular basis (at the end of any extensive coding session, once or
twice a day), and always compile manually before running new code.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Feb 16 '06 #5
MLH
Sure sounds like logical conclusions to me, Allen. I've been guilty
on countless occasions of editing code while the module was running -
I just assumed that - because I could - it must be OK to do so. But I
can readily understand the points you've made. I think I'll adopt your
practice of editing form & report code ONLY when such objects are
in design view.
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxx
On Wed, 15 Feb 2006 23:42:15 +0800, "Allen Browne"
<Al*********@Se eSig.Invalid> wrote:
Yes, decompile is a useful technique to solve a particular kind of
corruption with Access databases.

An MDB contains 2 copies of your VBA code:
- the text version (what you read and edit);
- the code version (what actually executes).

Under certain circumstances, these 2 can get out of sync, so that what is
running does not match the code you are viewing. A decompile instructs
Access to discard the compiled version. Then when you start the database
again, it recreates the compiled version out of the text, and the sync
problems are gone.

It is always good practice to back up before a decompile. If it were the
text copy that was damaged, a decompile could make things worse. In practice
this is rare (especially as you can see the problem in the text version.)
You probably want to compact immediatedly after a decompile to regain the
space that was occupied by the compiled code.

As to what causes this kind of corruption, without evidence I suspect that
editing a module while it is executing (i.e. in break mode) is a
contributing factor. When you begin editing, Access creates another temp
copy of the form and its module (so you can revert to the saved copy.) It is
now trying to balance 4 copies of the code. If this happens while the form
is open (not in design view) and the code is running, it appears that Access
gets confused between the different copies. The only evidence I have for
this is circumstantial, i.e. electing to always switch to design view before
editing prevented about 2/3 of the corruptions of this type that I
experienced.


Feb 16 '06 #6
MLH
DAvid - how does one go about turning off
COMPILE ON DEMAND?
Feb 16 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3934
by: matt | last post by:
I have compiled some code, some written by me, some compiled from various sources online, and basically i've got a very simple flat file photo gallery. An upload form, to upload the photos and give them a caption, storing the caption and filename in a text file. It's a bit buggy when removing the photos and captions from the file, and also in displaying them on the delete page. you can see it in action at www.4am.com.au/gallery/upload.php...
5
5470
by: Dave Smithz | last post by:
Hi There, I have a PHP script that sends an email with attachment and works great when provided the path to the file to send. However this file needs to be on the same server as the script. I want to develop a webpage where people can send attachments that are stored on their local PC.
11
1919
by: Deano | last post by:
Just wondering if there is a tool or method that will allow me to compare the state of my database before and after I decompile it. The last time I decompiled a few fields lost default values and some event code wasn't firing anymore. I know that sounds unusual but this was definitely the case. I would like to decompile again but am reluctant to do so if it causes any more problems. I would like to test what the decompile does to my...
0
1085
by: Mike MacSween | last post by:
So after a fair bit of work, with me always opening holding down the shift key to bypass the startup form -> switchboard, I try to test as a use. No error message, just a blank Access window, with File, Window and Help (I think) menu items. A decompile sorts it out. But why's this happening? The app uses Access security and the desktop shortcut that I'm using has the mdw info in it.
18
1810
by: Diogo Alves - Software Developer | last post by:
I found a few days ago that was possible to decompile any program developed in C# That is a huge failure.... It's not aceptable that a company that pays a lot for visual studio and pays to the employees to develop new product, and then all the code is exposed.... I found that the decompilers are pretty good, and have options like deObfuscate....
0
801
by: Al | last post by:
Having a net 2.0 exe or dll and having protect it with tools like Salamander Remotesoft or DotFuscator Professional or Xenocode Postbuild from what type of threat it will be protected? It seems that a disassembler will be able to open the file
6
1919
by: William Gill | last post by:
I have found a couple of sites that allow a visitor to upload an image and the site returns either the "average color", or a palette of colors. Several of them use PHP to accomplish this. I have requested the source code, but have not gotten a response (even though one site states "source code available on request"). It is obvious that they read the colors of each pixel and them manipulate that data. I would like to be able to do...
8
4351
by: Torben Laursen | last post by:
Hi I need to be sure that my C# code is as hard as possible to decompile. Can anyone tell what is the best tool for that job? Also will this be a part of Visual Studio 2008? It seems natural to me that the .net framework came with a solution so other people could not see your source code
14
1826
by: Grant | last post by:
I've seen a couple of articles on the internet that VB.NET applications can be decompiled very easy. For those who have had experience with this, is it true? What steps can be taken to avoid this? I am using VB.NET Express but am willing to buy something (within reason) to prevent easy decompiling. Any suggestions are much appreciated.
0
10845
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10592
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9376
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7792
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6979
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5828
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4456
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3116
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.