PC Review


Reply
Thread Tools Rate Thread

Compact and Repair database

 
 
TS Lim
Guest
Posts: n/a
 
      10th Apr 2010
I'm writing a program for my user to do the repair and compact of the backend.

I found two vba comands from the help file:
1. expression.CompactRepair(SourceFile, DestinationFile, LogFile)
2. expression.CompactDatabase(SrcName, DstName, DstLocale, Options, password)

It seem that I can only use No 2. because my backend is password protected.
My quesiton is: is command No 2 doing only compact and not repair, or it
perform the same as No 1, doing both compact and repair.

Thank you.


--
TS Lim
 
Reply With Quote
 
 
 
 
Daniel Pineault
Guest
Posts: n/a
 
      10th Apr 2010
You have the basic idea, but there is a great deal more to know to be able to
perform a compact and repair of the back-end from your front-end. For
instance, you first have to ensure exclusive connection to the db (no one
else can be in it at the time). Anyways, your best best is to look at
existing examples rather start to reinvent the wheel. If you google 'vba
compact and repair back-end' you'll find tons of information and examples.
Also, below are two that I found, the 1st of which is from a very good source
(I would tend to start there).

http://www.rogersaccesslibrary.com/forum/topic378.htm
http://bytes.com/topic/access/answer...-end-front-end
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



"TS Lim" wrote:

> I'm writing a program for my user to do the repair and compact of the backend.
>
> I found two vba comands from the help file:
> 1. expression.CompactRepair(SourceFile, DestinationFile, LogFile)
> 2. expression.CompactDatabase(SrcName, DstName, DstLocale, Options, password)
>
> It seem that I can only use No 2. because my backend is password protected.
> My quesiton is: is command No 2 doing only compact and not repair, or it
> perform the same as No 1, doing both compact and repair.
>
> Thank you.
>
>
> --
> TS Lim

 
Reply With Quote
 
David C. Holley
Guest
Posts: n/a
 
      11th Apr 2010
You can also create a shortcut which automatically compacts the DB via a
command line switch.

http://support.microsoft.com/kb/209207

"Daniel Pineault" <(E-Mail Removed)> wrote in
message news:EF255371-629D-4175-99DE-(E-Mail Removed)...
> You have the basic idea, but there is a great deal more to know to be able
> to
> perform a compact and repair of the back-end from your front-end. For
> instance, you first have to ensure exclusive connection to the db (no one
> else can be in it at the time). Anyways, your best best is to look at
> existing examples rather start to reinvent the wheel. If you google 'vba
> compact and repair back-end' you'll find tons of information and examples.
> Also, below are two that I found, the 1st of which is from a very good
> source
> (I would tend to start there).
>
> http://www.rogersaccesslibrary.com/forum/topic378.html
> http://bytes.com/topic/access/answer...-end-front-end
> --
> Hope this helps,
>
> Daniel Pineault
> http://www.cardaconsultants.com/
> For Access Tips and Examples: http://www.devhut.net
> Please rate this post using the vote buttons if it was helpful.
>
>
>
> "TS Lim" wrote:
>
>> I'm writing a program for my user to do the repair and compact of the
>> backend.
>>
>> I found two vba comands from the help file:
>> 1. expression.CompactRepair(SourceFile, DestinationFile, LogFile)
>> 2. expression.CompactDatabase(SrcName, DstName, DstLocale, Options,
>> password)
>>
>> It seem that I can only use No 2. because my backend is password
>> protected.
>> My quesiton is: is command No 2 doing only compact and not repair, or it
>> perform the same as No 1, doing both compact and repair.
>>
>> Thank you.
>>
>>
>> --
>> TS Lim



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot compact and repair a database Tammy Microsoft Access 5 3rd Dec 2007 08:17 PM
compact and repair database =?Utf-8?B?TWFqZWVk?= Microsoft Access 1 24th Jun 2007 07:33 AM
Marco - Database Utilties-Compact and Repair Database =?Utf-8?B?RGFubnk=?= Microsoft Access Macros 0 18th Apr 2005 10:15 AM
Compact and Repair a database Sandy Microsoft Access 1 19th Nov 2003 04:32 AM
Compact and Repair Database Rsharkey Microsoft Access Macros 4 13th Nov 2003 02:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:02 AM.