RepairDB




Case ...
RepairDatabase Curentdatabasename
Case ....
On Error resume next
Kill "temp.MDB"
Name curentdatabasename as "temp.mdb"
on error goto errcompact
compactdatabase "temp.mdb", Currentdatabasename
kill "temp.mbd"
exit sub
errcompact:
msgbox "compaction failed"
name "temp.mdb" as Currentdatabasename
Case ...
You will get a Reserved Error
[-1209] ("There is no message for this error")
when your database is corrupted
Try opening the database using MS Access; if it's corrupted
you should get the option to repair it. You should also compact
it, after repair. I recommend you add the following to your
File menu on your main form:










( repairdb.html )- by Paolo Puglisi - Modifica del 17/12/2023