Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 30th, 2003, 04:04 AM
Friend of Wrox
Join Date: Jun 2003
Location: Cardiff, , United Kingdom.
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?

Owain Williams
Owain Williams
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 11:48 AM.

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