MDB corrupt after rebuild, decompile & LoadFromText()

K

koko

I have a 'master' Access 97 application MDB in which I develop everything and
then create Access 97 and 2000 MDE's that I distribute to 1,000+ users every
few months. Yesterday I started building the next version and encountered an
error while copying and pasting a report inside my 'master' MDB. I then
unsuccessfully attempted to fix the MDB by:
1) Repairing & Compacting
2) Rebuilding the database by creating a new MDB and importing all the
objects from the old MDB
3) Decompiling and recompiling the MDB
4) Using SaveAsText() to dump all local tables, forms, reports, queries,
macros and modules to text files and then using LoadFromText() to recreate
all of them in a new MDB. I tested before compiling, after compiling and
after importing menus, import/export spec's, relationships etc from the old
MDB

My Access 97 application contains 34 local tables, about 100 attached
tables, 236 queries, 284 forms, 347 reports, 13 macros, 35 modules, about 20
import/export spec's, plus menus etc.

I have reproduced the problem on all 3 of my (notebook) computers running
the following versions of Windows
WinXP Pro
Win2000 Server (reformatted & reinstalled 3 days ago)
Win2003 Server (reformatted & reinstalled 3 days ago)
All of them have Access 97 SR2, Access 2000 SP3 and Office 2003 SP1
installed, 512MB or 1GB RAM and are fully patched.

Examples of problems are:

ERROR 1) Copy & Paste a form caused ERROR MESSAGE: The instruction at
"0x6517daaa" referenced memory at "0x000003c7". The memory could not be
"read". Click on OK to terminate the program Click on CANCEL to debug the
program When CANCEL is pressed, "Just-In-Time Debugging appears with "An
exception 'Unhandled Win32 Exception' has occurred in msaccess.exe."

ERROR 2) Editing and compiling a report module caused ERROR MESSAGE: The
instruction at "0x6517daaa" referenced memory at "0x000003c7". The memory
could not be "read". Click on OK to terminate the program Click on CANCEL to
debug the program When CANCEL is pressed, "Just-In-Time Debugging appears
with "An exception 'Unhandled Win32 Exception' has occurred in msaccess.exe."

ERROR 3) Editing and compiling a report module caused a compile error
which was not a problem in older versions of the same application (the source
code has not been changed in the new versions)

ERROR 4) Previewing a report caused a "memory error" (same as above)

ERROR 5) Renaming a report caused a "memory error" (same as above)

These errors occur on about 1 in 4 of the forms/reports/modules I try to
copy/edit/compile/preview/rename.

I went back to old versions of the application and found no problems with
the version built on 4/16/05, but can reproduce the problems on the next
version built on 4/25/05, the second last one dated 7/11/05 and the one I
released 9/22/05. My 1,000+ users do not have any problems running the MDE's
on Access 97/2000/2002/2003.

I need to fix this problem, develop my next version and release it in the
next week or so.

Thanks in advance.
 
A

Allen Browne

koko, this is very frustrating, and I don't have a solution for you, but may
have something that could help pin down the problem.

A couple of months back I copied and pasted a form in an Access 2003
database, and discovered that just doing that had corrupted the database.
While I have not seen that in A97, you might want to consider if it is a
factor.

What happened in my case was that there was that the new name did not appear
in the Database window, and Access was not able to OpenForm. It turned out
the the MSysObjects *did* contain the name, and so the Forms collection
(Documents) also reported the name, but the AllForms collection and the
database window did not. Of course, A97 does not have the AllForms
collection, and the approach to saving is different, so my experience may
not apply. It did scare me though. The alternative might be to open in
design view, and use SaveAs from the File menu.
 
K

koko

Further tests, this time with Access 2000
I used LoadFromText() to recreate all objects in a new Access 2000 MDB.
Compiled, imported import/export specs etc and reattached Access 2000 data.
I then did the same test as before, ie. coping & pasting a form, and editing
a report module.
While I was editing the report module, I got error message "Error accessing
file. Network connection may have been lost", even though both front-end and
backend are on a local drive.
 
K

koko

Thanks Allen,

I've come across your bug a few times myself, but this one is very
different. I cannot see how using SaveAsText() and LoadFromText() to recreate
all forms/reports/modules etc in a completely new MDB without ever 'touching'
the old MDB does not fix the corruption.

Different computers, different versions of Windows, both A97 & A2k, complete
recreation of the MDB and I still have corruptions.

I hope it doesn't spread ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top