Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 30th, 2003, 04:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
Default Repairing Corrupted Database in Code

I have received a corrupted Access 97 (Jet 3.51) database from one of our clients and I am trying to write a small application in VB that the user can run to repair it.

I am calling DBEngine.RepairDatabase followed by DBEngine.CompactDatabase (with a few clean-up and GUI lines as well), however the program crashes half way through the CompactDatase call (the original database is about 140Mb and the call fails when it has compacted between 30 and 40Mb).

When I try to do this in Access 2002 through Tools > Database Utilities > Compact and Repair Database... it succeeds, the database is reduced to about 137Mb and it is no longer corrupted.

What is Access doing differently from what I am doing in code? Is there a way to do what access does in my code without having to provide a third party database repair tool for the customer?

Regards
Owain Williams
__________________
Regards
Owain Williams





Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access .mdb & .ldb database corrupted faisal573 Access 17 December 6th, 2017 04:38 AM
Can a code be corrupted? A Watman PHP Databases 4 March 23rd, 2007 08:46 AM
DAPs Corrupted?? JpJoe Access 0 January 10th, 2005 09:45 AM
Repairing an ACCESS Dbase... dgarcia1128 Access 4 March 1st, 2004 03:29 PM
Repairing Corrupted Database in Code owain SQL Language 1 June 30th, 2003 05:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.