Search Tools Links Login

MS Access 97 : Undocumented Startup option that repairs and optimizes


Visual Basic 6, or VB Classic

While searching for a way to repair a corrupted database file, that couldn't be fixed with just Repair and Compact, i found this undocumented option that prooved to repair and optimize my database file. Read the whole article. Any comments or feedback are welcomed.

Original Author: John Galanopoulos

Code






New Page 3


The undocumented /decompile option


lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>I don't know how
many of you, are familiar to this, but there is an undocumented option on MS
Access 97 that can be issued not only as a command line option to a database,
that has a small chance of recovery, but also to a database that has many
objects (Tables, forms, reports, source etc)
and works very slowly or has a strange attitude or even memory leaks.


lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>What this option
seems to do, is a ÔÇ£cold bootÔÇØ to the database file that we try to fix or
optimize. It reorganizes every object respectively in a way, that results to a
more efficient and style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;font-weight:
normal;text-decoration:none;text-underline:none'>Well structured database file.


style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;font-weight:
normal;text-decoration:none;text-underline:none'>Take a closer look to the steps we must take so that
this hidden option works at it's best :


style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;font-weight:
normal;text-decoration:none;text-underline:none'>      
lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>    
1.style='font:7.0pt "Times New Roman"'>    lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>Create a backup of
the original database file.


lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>    
2.style='font:7.0pt "Times New Roman"'>    lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>Open the database
file like this


style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;text-decoration:
none;text-underline:none'>           
Msaccess.exe /decompile mydb.mdb


lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>3.style='font:7.0pt "Times New Roman"'>    lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>open the database
file, select a module and go to design view


lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>     
4.style='font:7.0pt "Times New Roman"'>  
lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>from the menu,
select Compile and save all modules


lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>     
5.style='font:7.0pt "Times New Roman"'>  
lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>Then compact your
database file..


lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>
.. and that's it.


lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>
In most cases, a
corrupted database file should be fixed. In every case though, mostly in a
slow, heavy-duty database file you ÔÇÿll notice that the file size of the mdb
will be reduced, the memory leaks will also be reduced and finally no strange
behaviour will be noticed.


lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>More information about how to repair an
access database file, can be found here :


      ACC97: How to Repair a Damaged Jet 3.5 Database (Q279334)


    
style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon'>href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;q279334">http://support.microsoft.com/default.aspx?scid=kb;EN-US;q279334lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;
font-weight:normal;text-decoration:none;text-underline:none'>


style='font-size:11.0pt;mso-bidi-font-size:12.0pt;color:maroon;font-weight:
normal;text-decoration:none;text-underline:none'>




About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 106 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.