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 VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 28th, 2006, 06:09 PM
Friend of Wrox
 
Join Date: Sep 2005
Location: , , USA.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Corey
Default Automatic Compact and Repair

Hello everyone.

I’m looking for some advice on the best way to automate a database to do two things.

1. A very quick repair, just to make sure everything is in line.
2. An automatic Compact and Repair.
3. Make backups within a created folder “example (My Documents)

Ultimately I would like it if I was able to find some code that would automatically find the database within list of databases, back it up in a folder I have assigned for it to be backed up in, Compacted and Repaired then the new Compacted, repaired and tweaked database would go back to the starting location.

If anyone has any advice or experience with this, I would be great full to hear from you

Thanks for your help

Corey


Reply With Quote
  #2 (permalink)  
Old March 29th, 2006, 08:43 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Where do you want to run this from? Most of it can be done from a script. I will have to look up the compact and repair. I usually set all my databases to compact on close, which keeps issues to a minimum.



mmcdonal
Reply With Quote
  #3 (permalink)  
Old March 29th, 2006, 09:08 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Here is a free utility that will do this for you.

Please note that it is USUALLY not necessary to repair a database unless it is in development. Once it goes into production, only compacting should be necessary.

Regardless, you can't really compact and repair a database in code if the database is 2000 or later. The datbase code and system information is stored in a BLOB instead of discrete records, as with earlier versions, so individuals items can't be rectified using DAO CompactDatabase, for example. Only the menu, switch (/Compact) or this utility (and others like it) will do the trick.

HTH

mmcdonal
Reply With Quote
  #4 (permalink)  
Old March 29th, 2006, 09:09 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Hehe, sorry: http://www.trigeminal.com/lang/1033/...asp?ItemID=2#2



mmcdonal
Reply With Quote
  #5 (permalink)  
Old March 29th, 2006, 10:49 AM
Friend of Wrox
 
Join Date: Sep 2005
Location: , , USA.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Corey
Default

This is great information. Thanks Mmcdonal

Reply With Quote
Reply


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
Compact and Repair Access Database raguapk VB How-To 8 May 23rd, 2013 10:00 AM
is there any auto compact repair utility to buy ? surajguru Access 5 October 15th, 2005 02:45 PM
Compact/Repair Access Database On The Fly kevorkian Classic ASP Databases 3 November 22nd, 2004 06:57 PM
Compact And Repair Access Database myedu2k4 Pro VB Databases 1 May 25th, 2004 01:43 AM
Compress and Repair Damaged Database owain Access 4 June 30th, 2003 05:55 AM



All times are GMT -4. The time now is 02:52 AM.


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