Utility to repair an access database outside of access

G

Guest

I work in a small critical care hospital.
we had an issue with a critical piece of equipment.
we have a a piece of software that uses an access database to store patient
names
and compresses images and sends the images to an outside source for reading.
that database became corrupt. I fixed the issue by running a compact and
repair on the database from access. Is there any way to run this repair
from a command prompt or a utility so the user of the machine doesnt have to
jump through a bunch of hoops to repair the database.

thank
 
G

Guest

There is an external program called JetComp that can repair the database and
even does a better job then the internal compact and repair. There are still
some hoops to jump through as it names the repaired database different than
the corrupt one. Therefore you need to first rename the problem database or
rename the repaired database so that shortcuts and links can work.

I have a white paper in a Word document named Fix Corrupt Access Database
that talks about JetComp. It's towards the bottom this page:
http://www.rogersaccesslibrary.com/OtherLibraries.asp

Tony Toews has an excellent web page on database corruption.
http://www.granite.ab.ca/access/corruptmdbs.htm

Allen Brown also has excellent info on corruption.
http://allenbrowne.com/ser-47.html
 
G

George Nicholson

One possibility:
There is a command line switch you could use to set up a shortcut that would
compact the file "on demand".

http://support.microsoft.com/default.aspx?scid=kb;EN-US;209207
How to use command-line switches in Microsoft Access

You could create a shortcut whose Target properties where something like
(start: one line):
"C:\Program Files\Microsoft Office\Office\msaccess.exe" "C:\Program
Files\Microsoft Office\Office\samples\northwind.mdb" /compact ["Path & Name
of New file"]
(end: one line)

You'd need to change the Path & File names above so it 1) points to the
location of your MSACCESS.EXE and 2) to the file you want to compact rather
than Northwind.mdb.

You can optionally include ["Path & Name.."] to specify a new file you want
to create from the compact procedure, but if you omit ["Path & Name..."] the
specified file (Northwind) will be compacted and retain the same name, and
that sounds like what you want. ([ ] indicates an optional argument, if you
supply the argument, don't include the brackets.)

All your user would have to do is click the shortcut and the file would be
compacted/repaired. Access does seem to open for a second, but closes as
soon as the compact is finished. The user can just sit & watch.

Be sure to test this on copies, etc. to be sure it does what you want.

HTH,
 
P

Pieter Wijnen

You can also make a Shortcut with the Command Switches /REPAIR /COMPACT
appended
ie

<path to msaccess.exe>\msaccess.exe <path to db.mdb>\db.mdb /REPAIR /COMPACT

Pieter
 
G

George Nicholson

FWIW, from Access 2000 on, /Repair is supported for backward compatibility.
It's functionality is included in the /Compact switch.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top