Hi
If the client has Microsoft Jet and Replication objects installed, then it
is a simple process.
Try this :
Dim objDB As JRO.JetEngine
Dim objFSO As Scripting.FileSystemObject
'create jetengine object
Set objDB = New JRO.JetEngine
'compact DB to new location
objDB.CompactDatabase strsource, strdest
'create file system object to move 'new' DB
Set objFSO = New Scripting.FileSystemObject
'move db
objFSO.MoveFile strdest, strsource
'clean up objects
Set objFSO = Nothing
Set objDB = Nothing
-----Original Message-----
From: Clif Dunaway [mailto:csdunaway@y...]
Sent: Monday, February 24, 2003 5:29 PM
To: professional vb
Subject: [pro_vb] How to compact a Microsoft Access Database in VB?
I need some help! How do I compact a Microsoft Access database from VB? The
client machine will not have Access installed, so I didn't know if there is
a reference I can use to do it through VB?
Thanks,
Clif Dunaway
______________________________________________
"The information contained in this communication is confidential and
may be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it. If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking action
in reliance of the contents of this information is strictly prohibited
and may be unlawful. Absa is liable neither for the proper, complete
transmission of the information contained in this communication, nor
for any delay in its receipt, nor for the assurance that it is
virus-free."