Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to Reduce Size of Front-End

    I'd appreciate any ideas/hints/suggestions on how to reduce the size of a front-end database (A97). I usually compact daily. However, I'm trying to keep the size down so when zipped can be emailed (less than 1.5MB zipped).

    What type objects seem to require the most space?

    Any options I can consider disabling to make the database smaller?

    TIA.

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

    Re: How to Reduce Size of Front-End

    Are you talking about reducing it beyond the size it usually compacts to? If so, one trick I've found is to run a decompile on the database, then without recompiling it, to run a compact and repair. That will squeeze a bit more space out of it, but it will have to be recompiled on the other end which means it will start more slowly the first time it's run.

    Also remove any unused tables, queries, forms, code, etc. from the database. This includes all those Query1, Query2, etc., temporary queries that you might want to go back to but aren't really using. If you have links to text files or other external files that aren't being sent with the database, remove them and add code to create the link on the other end. Don't leave "extra" code lying around in the database just because you might want to use it some time. Only include code you actually use and stash the extra stuff in a library database somewhere handy.
    Charlotte

  3. #3
    Star Lounger
    Join Date
    Apr 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Reduce Size of Front-End

    This is an application I've been developing over the last year. I've nearly completed all the major goals but finding the front-end size creeping upwards - many times I feel NOT in proportion to the objects added.

    I'm trying to reduce the front-end database to the smallest possible size. Currently in the process of removing unused objects. However, 'tis a slow process (even with a find/replace utility). Plus, this seems to be making very minor gains size-wise.

    How does one decompile a database? I'm using Access '97.

    Next step will be revisiting the coding to see if I can figure more efficient ways to write/structure it. For example due to time constraints I had to quickly create eight (8) separate import forms for different types of imports. Each one has a slightly different process, but some of the code repeats with each of the 8 forms. I plan to see if I can either A) use just one form and through code accomodate for the variations [img]/forums/images/smilies/cool.gif[/img] take code that is the same throughout these forms and place in a module.)

    I'm also trying to figure out if there are Access options which automatically come with each database which could be disabled if not needed hopefully further reducing the overhead.

    Thanks for any further help.

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: How to Reduce Size of Front-End

    Embedded graphics can be a big problem as far a space goes. Such as background pictures in forms, logos in reports, etc. Rather than embedding, you could link to the files on disk (although this becomes a problem if they aren't where you expect them to be, which often happens with multiple sites). Or, you can load them into a table in your database, and get them when needed.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

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

    Re: Decompile

    Decompile can cure a lot of odd problems in a database, including some that hold onto space when you compact the database. It works the same in Access 97 or 2000 and it decompiles all the code and other compiled objects like queries. Here's how I usually do it.

    1. With a Windows Explorer window open, Click on the Windows Start button on the taskbar and select Run from the menu.

    2. Use the Explorer window to locate the Msaccess.exe file and drag that down onto the Run dialog. That will put the file name and path in the textbox.

    3. Use the Explorer window to locate the database file you want to decompile and drag that down onto the same Run dialog. That will put that file name and path in the textbox after the Access executable.

    4. Click in the textbox and use the End button to move to the end of the string. Then type a space and "/decompile" without the quotes.

    5. Then click on OK to run the decompile. If the database has a startup routine you need to bypass, hold down the Shift key while you click the OK button.

    6. Then you can go into the Visual Basic Editor either by opening any module in design mode or by clicking Alt+F11 and recompile the code project. If you need to squeeze out as much size as possible for zipping the file and are willing to live with the delay while it recompiles itself later, skip this step.

    7. Now you can compact and repair the database and you'll usually get rid of some additional size, plus you'll cure some problems you may not even know you had.
    Charlotte

  6. #6
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Decompile - WOW!

    WOAH! I've known about Decomplie, but never actually tried it until now. I took a fairly optimized database that was about 2.5 MB and it reduced down to 1.6 MB!!

    Bravo Charlotte!! <img src=/S/bow.gif border=0 alt=bow width=15 height=15> <img src=/S/salute.gif border=0 alt=salute width=15 height=20> <img src=/S/queen.gif border=0 alt=queen width=19 height=20>

  7. #7
    DaveShmave
    Guest

    Re: Decompile - WOW!

    Yeah I've used decompile quite a bit with great success.

    It seems to be more effective in Access 97 than 2000 due to "unicode". I have to admit I'm not sure what "unicode" is (what that means).

    Dave

  8. #8
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Decompile

    Here's an idea to make Decompile easier. You can use Regedit to add Decompile to the right-click menu for MDB databases. Try this:
    1) In the Registry, locate: HKey_Classes_RootAccess.Application.9shell (or .8 for Access 97)

    2) Add a key called Decompile (or whatever name you choose)

    3) Set the default value of that key to the name you want to see in the Right-click menu ("&Decompile")

    4) Add a subkey to the newly created key called "command"

    5) Set the default value of the "command" key to: "Your MS Office Path" "%1" /DECOMPILE (Quotes are necessary around the %1, but only necessary around the office path if you use the Long File Name) For Example:<pre>"C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" "%1" /DECOMPILE</pre>


    6) When you Right-click an Access Database in Windows Explorer, you'll see Decompile in the list.

    7) Select Decompile, then Compact and Repair to finish the process!

    HTH <img src=/S/salute.gif border=0 alt=salute width=15 height=20>
    Attached Images Attached Images

  9. #9
    Star Lounger
    Join Date
    Apr 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Many Many Thanks!

    Thanks to all who responded with suggestions. The decompile seems to have had the largest impact. The size of the database went from 7,660 KB down to a svelte 2,972 KB with the zipped version being only 704KB. I feel I now have manuevering room!!!!!!!!

    Many many thanks again.

  10. #10
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Decompile

    My understanding is that you should always backup a database that you are about to decompile.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  11. #11
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Decompile

    Hey Mark,
    I know this is an old post but what about A2K2? Would that key then be .10?

    Thanks,
    Mark

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Decompile

    Yes:
    Office 97 = Office 8
    Office 2000 = Office 9
    Office XP = Office 10
    and the new version that is being beta tested is Office 11.

    This also applies when setting references to the object libraries of Office applications in the Visual Basic Editor: to work with the Excel object library, you must set a reference to the Microsoft Excel n.0 Object Library, where n = 8 for Office 97, n = 9 for Office 2000, n = 10 for Office XP.

  13. #13
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Decompile

    I tried this with success to the problem of creating an MDE file. However, if I perform this function again on the same file, it increases in size. Actually just testing it, I decompiled the file, then compact and repaired it three times. The resultant file went from 5.8MB to 7.5MB. Does anyone know how to cure this? Is there possibly some additional data the thing is storing each time the decompile is done?

    Thanks,
    Mark

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

    Re: Decompile

    Are you talking about decompiling an MDE file? Can you even do that?

    I'm not sure I understand what you're describing. You opened Access with the decompile switch and opened a database, which decompiled the code, right? Then you closed Access and reopened it without the decompile switch and did a compact and repair 3 times? What version of Access are you using? I just tested it with A2k and with the database open and it kept the same size after the first compact and repair. Did you compact to another file and then compact that again, etc.? When I did it that way, I still didn't get any growth. Did you open up the database in between and do anything at all? That could have caused a change in the size, especially if you're using subdatasheets or haven't turned off Name Autocorrect.
    Charlotte

  15. #15
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Decompile

    Thanks Charlotte,
    No, my original problem was that I couldn't create an MDE file. It would just bomb out. So after reading these great posts that you guys put up, I decompiled the file. I then compacted and repaired the file. I have changed nothing about the design of the file while doing this process. The file increases in size every time I decompile and compact it.

    Thanks,
    Mark

Page 1 of 2 12 LastLast

Posting Permissions

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