473,322 Members | 1,232 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Invisible corruption

I have one particular database that seems corrupt. I've run "Compact
and Repair" to no avail. It is Access 2000 on Windows 2000. Other mdb
files do not have this problem. all data seems fine as do tables. The
problem is in the VBA window. If I go to the "Object Browser" I get a
msgbox "You cancelled previous operation". If I reference
?currentdb.tabledefs.count in the immediate window, I get a msgbox
telling me that the module is not loaded.
Hmmm.....what to do?

-mjm

Nov 12 '05 #1
9 1732
Try a decompile.

Make a backup copy of your database while it is not open.

At the command prompt, enter something like this. It's one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\My Documents\MyDatabase.mdb"

Then open and compact the database.

If that does not solve the problem:
1. Create a new (blank) database.
2. Turn off the Name AutoCorrect boxes: Tools | Options | General.
3. Import everything from your old database: File | Get External | Import.

--
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.

"michael montagne" <mm*******@walkermacy.com> wrote in message
news:3f********@news.athenanews.com...
I have one particular database that seems corrupt. I've run "Compact
and Repair" to no avail. It is Access 2000 on Windows 2000. Other mdb
files do not have this problem. all data seems fine as do tables. The
problem is in the VBA window. If I go to the "Object Browser" I get a
msgbox "You cancelled previous operation". If I reference
?currentdb.tabledefs.count in the immediate window, I get a msgbox
telling me that the module is not loaded.
Hmmm.....what to do?

Nov 12 '05 #2
Here is some information on database corruption.
http://users.bigpond.net.au/abrowne1/ser-25.html

I would try a decompile. Make a COPY (or 2 or 3) of your file FIRST.

To decompile, open the database with the following command line:

"<path>\msaccess.exe" "<path>\mydatabase.mdb" /excl /decompile

Add to the above line any switches you would normally need for workgroup,
user name, and password. The password mentioned here is the user security
password, not the file password. If you have a password on the mdb file,
you'll have to enter that as the file opens.

Once the file is open, do a Compact/Repair. When it reopens from that, go to
a code window (Alt+F11) and to the Debug menu. Choose Compile <MyDatabase>.
Do another Compact/Repair for good measure.

--
Wayne Morgan
MS Access MVP
"michael montagne" <mm*******@walkermacy.com> wrote in message
news:3f********@news.athenanews.com...
I have one particular database that seems corrupt. I've run "Compact
and Repair" to no avail. It is Access 2000 on Windows 2000. Other mdb
files do not have this problem. all data seems fine as do tables. The
problem is in the VBA window. If I go to the "Object Browser" I get a
msgbox "You cancelled previous operation". If I reference
?currentdb.tabledefs.count in the immediate window, I get a msgbox
telling me that the module is not loaded.
Hmmm.....what to do?

-mjm

Nov 12 '05 #3
That URL has moved to:
http://allenbrowne.com/ser-25.html

--
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.

"Wayne Morgan" <co***************************@hotmail.com> wrote in message
news:BS*****************@newssvr22.news.prodigy.co m...
Here is some information on database corruption.
http://users.bigpond.net.au/abrowne1/ser-25.html

I would try a decompile. Make a COPY (or 2 or 3) of your file FIRST.

To decompile, open the database with the following command line:

"<path>\msaccess.exe" "<path>\mydatabase.mdb" /excl /decompile

Add to the above line any switches you would normally need for workgroup,
user name, and password. The password mentioned here is the user security
password, not the file password. If you have a password on the mdb file,
you'll have to enter that as the file opens.

Once the file is open, do a Compact/Repair. When it reopens from that, go to a code window (Alt+F11) and to the Debug menu. Choose Compile <MyDatabase>. Do another Compact/Repair for good measure.

--
Wayne Morgan
MS Access MVP
"michael montagne" <mm*******@walkermacy.com> wrote in message
news:3f********@news.athenanews.com...
I have one particular database that seems corrupt. I've run "Compact
and Repair" to no avail. It is Access 2000 on Windows 2000. Other mdb
files do not have this problem. all data seems fine as do tables. The
problem is in the VBA window. If I go to the "Object Browser" I get a
msgbox "You cancelled previous operation". If I reference
?currentdb.tabledefs.count in the immediate window, I get a msgbox
telling me that the module is not loaded.
Hmmm.....what to do?

-mjm

Nov 12 '05 #4
co***************************@hotmail.com (Wayne Morgan) wrote in
<BS*****************@newssvr22.news.prodigy.com> :
Once the file is open, do a Compact/Repair. When it reopens from
that, go to a code window (Alt+F11) and to the Debug menu. Choose
Compile <MyDatabase>. Do another Compact/Repair for good measure.


No, you should close the DECOMPILE instance of Access before doing
anything else. Do you compact and recompile in a new instance of
Access, not the one opened with the /decompile switch.

MichKa gave this advice a long time ago, suggesting that it was
unclear what kind of state Access would be in when opened with an
undocumented switch.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #5
Thanks David, that makes sense and would probably be safer.

--
Wayne Morgan
MS Access MVP
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.78.. .
co***************************@hotmail.com (Wayne Morgan) wrote in
<BS*****************@newssvr22.news.prodigy.com> :
Once the file is open, do a Compact/Repair. When it reopens from
that, go to a code window (Alt+F11) and to the Debug menu. Choose
Compile <MyDatabase>. Do another Compact/Repair for good measure.


No, you should close the DECOMPILE instance of Access before doing
anything else. Do you compact and recompile in a new instance of
Access, not the one opened with the /decompile switch.

MichKa gave this advice a long time ago, suggesting that it was
unclear what kind of state Access would be in when opened with an
undocumented switch.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc

Nov 12 '05 #6
David,

Would closing the database open up an Access 2000 user to the following if
they didn't have all their patches installed?

http://support.microsoft.com/default...roduct=acc2000

Although, a compact closes it also and may cause the same problem if this is
the case.

--
Wayne Morgan
MS Access MVP
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.78.. .
co***************************@hotmail.com (Wayne Morgan) wrote in
<BS*****************@newssvr22.news.prodigy.com> :
No, you should close the DECOMPILE instance of Access before doing
anything else. Do you compact and recompile in a new instance of
Access, not the one opened with the /decompile switch.

Nov 12 '05 #7
co***************************@hotmail.com (Wayne Morgan) wrote in
<CD*********************@newssvr11.news.prodigy.co m>:
Would closing the database open up an Access 2000 user to the
following if they didn't have all their patches installed?

http://support.microsoft.com/default...us;304548&Prod
uct=acc2000

Although, a compact closes it also and may cause the same problem
if this is the case.


I don't know. But I don't consider it a very significant risk, as
anyone who has the problem should have patched it ages ago.

In any event, when is any particular Access MDB ever not
disposable? That is, when would anyone do this kind of thing
without a backup?

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #8
"Wayne Morgan" <co***************************@hotmail.com> wrote:
David,

Would closing the database open up an Access 2000 user to the following if
they didn't have all their patches installed?

http://support.microsoft.com/default...roduct=acc2000

Although, a compact closes it also and may cause the same problem if this is
the case.


<shrug> In my opinion you should be running SP3 anyhow.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 12 '05 #9
I agree, it should be patched already. I was just "what ifing".

--
Wayne Morgan
MS Access MVP
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.90.. .
co***************************@hotmail.com (Wayne Morgan) wrote in
<CD*********************@newssvr11.news.prodigy.co m>:
I don't know. But I don't consider it a very significant risk, as
anyone who has the problem should have patched it ages ago.

In any event, when is any particular Access MDB ever not
disposable? That is, when would anyone do this kind of thing
without a backup?

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc

Nov 12 '05 #10

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

Similar topics

5
by: Noa Garnett | last post by:
I'm developing on C++, using visual studio 6.0 with service pack 5. I have a memory corruption while debugging. Some of the variables I'm using are suddenly set to zero while progressing along the...
19
by: Mark C. | last post by:
The company I work for has been running Access 2000 on a Windows NT server with Opportunistic Locking turned off on the server without issue for almost a year. We have just switched to a Windows...
6
by: Mike | last post by:
I have done a lot of research on DAO and database corruption and have not yet found any solid information for my problem. I use DAO extensively in my Access 97 databases (back-end on network,...
4
by: DFS | last post by:
" has detected corruption in this file. To try to repair the corruption, first make a backup copy of the file. Then, on the Tools menu, point to Database Utilities and click Compact and Repair...
47
by: ship | last post by:
Hi We need some advice: We are thinking of upgrading our Access database from Access 2000 to Access 2004. How stable is MS Office 2003? (particularly Access 2003). We are just a small...
8
by: ranjeet.gupta | last post by:
Dear All Is the Root Cause of the Memory corruption is the Memory leak, ?? suppose If in the code there is Memory leak, Do this may lead to the Memory Corruption while executing the program ? ...
23
by: Dave G | last post by:
Since upgrading one of my clients from A97/W2000 to A2003/XP they have suffered no end of data corruption problems, mainly involving one of the main tables. The corruption can result in one...
2
by: nepdae | last post by:
Please forgive me, this is a long one. My 11-user Access 2000 database is having recurring corruption problems. The symptoms include the following: 1) corrupted fields in recently created or...
42
by: Doug | last post by:
I am in a friendly debate with some co-workers... and my boss. We use Access 2003 for the frontend (on workstations) as well as for the backend (on a Dell PowerEdge running Windows 2000 server,...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.