Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Faifax, Virginia, USA
    Posts
    542
    Thanks
    0
    Thanked 0 Times in 0 Posts

    When good VBA goes bad (A2K 9.0.4402 SR-1)

    This has happened before - "all of a sudden", the VBA modules don't load????

    By opening the mdb from the command line using the /decompile argument, I received the error message that the VBA project was corrupt, but I could continue or cancel the database load.

    What is it that is going bad in this project? What did I do to corrupt it? <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: When good VBA goes bad (A2K 9.0.4402 SR-1)

    You didn't necessarily do anything. If you do a lot of code editing or object modification in a database, you're code project and get corrupted all by itself.

    Did you try compiling the database after the decompile? If not, that would be the first thing to try. Then I'd suggest creating a new database and importing the objects from the old one. Anything that won't import is corrupted beyond repair. However, if you can get into the old database as you have, you may be able to export the individual modules from the VB project to text files. That will cure a lot of corruption and you may be able to salvage all or at least most of your code that way.
    Charlotte

  3. #3
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Faifax, Virginia, USA
    Posts
    542
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: When good VBA goes bad (A2K 9.0.4402 SR-1)

    I have been "fooling around" trying to figure what to import and where the snags are. I havent tried compiling, just compacting. I'll give compiling a shot soon.

    What is scary about this is the idea of deploying an app --- I send my code off into the world and it gets corrupted thru no fault of the user. How does one deal with this? What kind of safeguards should I be using? <img src=/S/yikes.gif border=0 alt=yikes width=15 height=15>

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: When good VBA goes bad (A2K 9.0.4402 SR-1)

    I've never had this happen in the 9 years I've been building Access applications. I used to have more problems with dBase. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

    The only time I've seen objects, including code, corrupt is when I've been slamming it heavily with design changes--not necessarily big ones, just lots of tweaking. When I'm working on an app, I compact every time I close the database (in 2000 I just turn the setting on so it takes care of that automatically). That helps, but I also periodically run a decompile on the database, then compact it. *Then* I recompile it and compact it again. The difference is size from before the decompile is usually significant, and I can't remember the last time I had a problem with serious corruption, just the occasional form or query that I've pounded too hard. Did I mention that I also stash backup copies in zip files where I won't be likely to overwrite them by mistake?

    The stuff that users do shouldn't cause corruption, that seems to be the prerogative of developers. <img src=/S/nuts.gif border=0 alt=nuts width=15 height=15>
    Charlotte

  5. #5
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Faifax, Virginia, USA
    Posts
    542
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: When good VBA goes bad (A2K 9.0.4402 SR-1)

    Phew!

    Tweaks it was.

    I also set the compact on close. I will institute the other procedures immediately. What frequency do you recommend?

    It seems to me that there might be an anitcorrupter program that could read the access files and sort this all out. Is there a document that details the structure of the mdb files? <img src=/S/nuts.gif border=0 alt=nuts width=15 height=15> is right.

  6. #6
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Faifax, Virginia, USA
    Posts
    542
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: When good VBA goes bad (A2K 9.0.4402 SR-1)

    Thanks for the lead.

    The link was incorrect in the previous post, should be http:// www.fmsinc.com/products/analyzer/ ('c' was missing)

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: When good VBA goes bad (A2K 9.0.4402 SR-1)

    I just keep an eye on the size of the file. When it reaches double the size it should be and compact doesn't shrink it back down, I run a decompile. All the tweaks cause the hidden queries and the stuff that Jet uses internally to bloat the database. Deleting and recreating tables especially is a killer for bloat.
    <hr>It seems to me that there might be an anitcorrupter program that could read the access files and sort this all out<hr>
    There may be, but I admit I haven't looked for one because in my experience this is a development phenomenon and not one that occurs frequently in production applications. <A target="_blank" HREF=http://www.fmsinc.com>http://www.fmsinc.com</A> Offers a product called Total Access Analyzer which some people swear by, but I've never been fond of their products. They have a lot of stuff in them, but it usually is much more than I want to use so I resist their pricing.

    Edited to correct link--Charlotte
    Charlotte

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: When good VBA goes bad (A2K 9.0.4402 SR-1)

    Thanks, I fixed it.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •