dbTalk Databases Forums  

More on the "/repair /compact" and "/decompile /recompile" switches

comp.databases.ms-access comp.databases.ms-access


Discuss More on the "/repair /compact" and "/decompile /recompile" switches in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Don L
 
Posts: n/a

Default More on the "/repair /compact" and "/decompile /recompile" switches - 03-22-2009 , 09:15 PM






I made up a VERY simple app that automates this process, and have just added
the option to "/decompile /recompile" before sending the last message.
=============================
Option Compare Database
Option Explicit


Private Sub cmdGetOpenFile_Click()
Dim Result
Dim strShell
Dim MyFile
MyFile = GetOpenFile("C:\Documents and Settings\Don\My Documents\", "Select
an MDB file to compact")
'Debug.Print MyFile
strShell = Chr$(34) & "C:\Program Files\Microsoft
Office97\Office\msaccess.exe" & Chr$(34)

Select Case Me.optRepairCompile
Case 1
strShell = strShell & " " & Chr$(34) & MyFile & Chr$(34) & "
/repair/compact"
Case 2
strShell = strShell & " " & Chr$(34) & MyFile & Chr$(34) & "
/decompile/recompile"
End Select

'Debug.Print strShell

Result = Shell(strShell, vbNormalFocus)
End Sub
Private Sub cmdQuit_Click()
On Error GoTo Err_cmdQuit_Click


DoCmd.Quit

Exit_cmdQuit_Click:
Exit Sub

Err_cmdQuit_Click:
MsgBox Err.Description
Resume Exit_cmdQuit_Click

End Sub

Private Sub optRepairCompile_AfterUpdate()

Select Case Me.optRepairCompile
Case 1
Me.cmdGetOpenFile.Caption = "Choose a Database to Repair / Compact"
Case 2
Me.cmdGetOpenFile.Caption = "Choose a Database to Decompile / Recompile"
End Select

End Sub



Reply With Quote
  #2  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: More on the "/repair /compact" and "/decompile /recompile" switches - 03-22-2009 , 09:44 PM






A really nice simple way of doing this is to add a "right click" context
menu to windows...


here is a registry edit for access 97:

The above gives you BOTH compact option, and also a de-compile by simply
selecting any file and right clicking on it.

I editing the above one for use with access 2003...and I ALWAYS do a
decompile if my application crashes. (I find after a crash, often the
application is damaged...(.

I editing the above reg edit for access 2003, and for other people...you can
grab the a2003 version here:

http://www.members.shaw.ca/AlbertKal.../msaccess.html
(search for decompile in the above page).

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal (AT) msn (DOT) com



Reply With Quote
  #3  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: More on the "/repair /compact" and "/decompile /recompile" switches - 03-22-2009 , 09:45 PM




"Albert D. Kallal" <PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote

Quote:
A really nice simple way of doing this is to add a "right click" context
menu to windows...


here is a registry edit for access 97:


sorry...left out the link for a97...

http://www.mvps.org/access/modules/mdl0039.htm




Reply With Quote
  #4  
Old   
Phil Stanton
 
Posts: n/a

Default Re: More on the "/repair /compact" and "/decompile /recompile" switches - 03-23-2009 , 03:16 AM



Can I assume that if I change the "11" to "10" that would be the correct
registry entry for AK2

Thanks

Phil

"Albert D. Kallal" <PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote

Quote:
A really nice simple way of doing this is to add a "right click" context
menu to windows...


here is a registry edit for access 97:

The above gives you BOTH compact option, and also a de-compile by simply
selecting any file and right clicking on it.

I editing the above one for use with access 2003...and I ALWAYS do a
decompile if my application crashes. (I find after a crash, often the
application is damaged...(.

I editing the above reg edit for access 2003, and for other people...you
can grab the a2003 version here:

http://www.members.shaw.ca/AlbertKal.../msaccess.html
(search for decompile in the above page).

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal (AT) msn (DOT) com




Reply With Quote
  #5  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: More on the "/repair /compact" and "/decompile /recompile" switches - 03-25-2009 , 01:04 PM



"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote

Quote:
Can I assume that if I change the "11" to "10" that would be the correct
registry entry for AK2

Thanks

Phil

yes...that should work.....

That registry edit is very much the "first" thing I do on my pc used for
access development..


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal (AT) msn (DOT) com




Reply With Quote
  #6  
Old   
Phil Stanton
 
Posts: n/a

Default Re: More on the "/repair /compact" and "/decompile /recompile" switches - 03-26-2009 , 12:05 PM



Hi Albert. It appears that the 11 needs changing to 9 for Access 2000, but
although the option comes up to Decompile OK on right clicking the explorer
program, the Db does not seem to decompile. In fact the window comes up
asking which program I want to use, and when I say "Access" it just appears
to open the Db

Thanks

Phil


"Albert D. Kallal" <PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote

Quote:
"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote in message
news:z4ydnaJ4JMHlzlrUnZ2dnUVZ8saWnZ2d (AT) posted (DOT) plusnet...
Can I assume that if I change the "11" to "10" that would be the correct
registry entry for AK2

Thanks

Phil


yes...that should work.....

That registry edit is very much the "first" thing I do on my pc used for
access development..


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal (AT) msn (DOT) com





Reply With Quote
  #7  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: More on the "/repair /compact" and "/decompile /recompile" switches - 03-26-2009 , 06:39 PM



"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote


Quote:
Hi Albert. It appears that the 11 needs changing to 9 for Access 2000, but
although the option comes up to Decompile OK on right clicking the
explorer program, the Db does not seem to decompile. In fact the window
comes up asking which program I want to use, and when I say "Access" it
just appears to open the Db

Thanks

Phil

Yes....you are correct (Sorry), it is "9" for a2000.

so, for access 2000, you get:

REGEDIT4

; This adds the ability to Right-Click on an MDB file
; and get the Decompile / Compact options.
;
; If it doesn't work for you, mail me and tell me about it.
;
; Original version provided by
; Jon Evans <jon (AT) evansoft (DOT) demon.co.uk>
; Copied from http://www.mvps.org/ccrp
; as ocxdllreg.zip
; Modified by
; Dev Ashish <dash10 (AT) hotmail (DOT) com>

; ==========
; .MDB files
; ==========

[HKEY_CLASSES_ROOT\.mdb]
"Content Type"="application/x-msaccess"
@="Access.Application.9"
[HKEY_CLASSES_ROOT\Access.Application.9]
@="Microsoft Access Database"

[HKEY_CLASSES_ROOT\Access.Application.9\Shell\Decom pile\command]
@="C:\\Program Files\\Microsoft Office\\Office\\MSAccess.exe \"%1\"
/DECOMPILE"

[HKEY_CLASSES_ROOT\Access.Application.9\Shell\Compa ct\command]
@="C:\\Program Files\\Microsoft Office\\Office\\MSAccess.exe \"%1\"
/COMPACT"

; End


You must of left something out as I just tired this on a2000...and it works
fine for me...


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal (AT) msn (DOT) com




Reply With Quote
  #8  
Old   
Phil Stanton
 
Posts: n/a

Default Re: More on the "/repair /compact" and "/decompile /recompile" switches - 03-28-2009 , 08:30 AM



Cant find out what's missing.

When you tried it, does it ask what program you want to use (On the
decompile option especially)

Thanks

Phil

"Albert D. Kallal" <PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote

Quote:
"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote in message
news:K4-dnT-H0Pl8XlbUnZ2dnUVZ8vCdnZ2d (AT) posted (DOT) plusnet...

Hi Albert. It appears that the 11 needs changing to 9 for Access 2000,
but although the option comes up to Decompile OK on right clicking the
explorer program, the Db does not seem to decompile. In fact the window
comes up asking which program I want to use, and when I say "Access" it
just appears to open the Db

Thanks

Phil


Yes....you are correct (Sorry), it is "9" for a2000.

so, for access 2000, you get:

REGEDIT4

; This adds the ability to Right-Click on an MDB file
; and get the Decompile / Compact options.
;
; If it doesn't work for you, mail me and tell me about it.
;
; Original version provided by
; Jon Evans <jon (AT) evansoft (DOT) demon.co.uk
; Copied from http://www.mvps.org/ccrp
; as ocxdllreg.zip
; Modified by
; Dev Ashish <dash10 (AT) hotmail (DOT) com

; ==========
; .MDB files
; ==========

[HKEY_CLASSES_ROOT\.mdb]
"Content Type"="application/x-msaccess"
@="Access.Application.9"
[HKEY_CLASSES_ROOT\Access.Application.9]
@="Microsoft Access Database"

[HKEY_CLASSES_ROOT\Access.Application.9\Shell\Decom pile\command]
@="C:\\Program Files\\Microsoft Office\\Office\\MSAccess.exe \"%1\"
/DECOMPILE"

[HKEY_CLASSES_ROOT\Access.Application.9\Shell\Compa ct\command]
@="C:\\Program Files\\Microsoft Office\\Office\\MSAccess.exe \"%1\"
/COMPACT"

; End


You must of left something out as I just tired this on a2000...and it
works fine for me...


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal (AT) msn (DOT) com





Reply With Quote
  #9  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: More on the "/repair /compact" and "/decompile /recompile" switches - 03-28-2009 , 11:14 AM



"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote

Quote:
Cant find out what's missing.

When you tried it, does it ask what program you want to use (On the
decompile option especially)

No...no prompts....

However, is it possible that you installed office to a "custom" dir....

check the location of ms-access.exe.....

C:\\Program Files\\Microsoft Office\\Office\\MSAccess.exe

Perhaps you have something like

C:\\Program Files\\Microsoft Office\\Office\\office9\\MSAccess.exe

or

C:\\Program Files\\Microsoft Office\\Office\\office2000\\MSAccess.exe

So, check the above dir path.....

Perahps even do a search for msaccess.exe...


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal (AT) msn (DOT) com




Reply With Quote
  #10  
Old   
Phil Stanton
 
Posts: n/a

Default Re: More on the "/repair /compact" and "/decompile /recompile" switches - 03-30-2009 , 09:38 AM



Sorry for delay in coming back

Access is in C:\Program Files\Microsoft Office\Office

Phil


"Albert D. Kallal" <PleaseNOOOsPAMmkallal (AT) msn (DOT) com> wrote

Quote:
"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote in message
news:vJKdndgRhtzvqVPUnZ2dnUVZ8tqWnZ2d (AT) posted (DOT) plusnet...
Cant find out what's missing.

When you tried it, does it ask what program you want to use (On the
decompile option especially)


No...no prompts....

However, is it possible that you installed office to a "custom" dir....

check the location of ms-access.exe.....

C:\\Program Files\\Microsoft Office\\Office\\MSAccess.exe

Perhaps you have something like

C:\\Program Files\\Microsoft Office\\Office\\office9\\MSAccess.exe

or

C:\\Program Files\\Microsoft Office\\Office\\office2000\\MSAccess.exe

So, check the above dir path.....

Perahps even do a search for msaccess.exe...


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal (AT) msn (DOT) com





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.