- Home
·
- Miscellaneous
·
- Data Compression: If you previously deleted large amounts of data, run this procedure to reclaim di
Data Compression: If you previously deleted large amounts of data, run this procedure to reclaim di
Data Compression: If you previously deleted large amounts of data, run this procedure to reclaim disk space used by deleted records and
Rate Data Compression: If you previously deleted large amounts of data, run this procedure to reclaim di
(2(2 Vote))
Dim DbsAccount As DataBase
Dim Source As String, Target As String
Dim FSo, Fil2
Source = App.path & "\Account.mdb"
Target = App.path & "\Account1.mdb"
On Error GoTo Err_handler
Set DbsAccount = OpenDatabase(Source)
' Show the properties of the original database.
With DbsAccount
Debug.Print .NAME & ", version " & .Version
Debug.Print " CollatingOrder = " & .CollatingOrder
.Close
End With
DBEngine.CompactDatabase Source, _
Target, dbLangKorean
DoEvents
Set DbsAccount = OpenDatabase(Target)
' Show the properties of the compacted database.
With DbsAccount
Debug.Print .NAME & ", version " & .Version
Debug.Print " CollatingOrder = " & .CollatingOrder
.Close
End With
FileCopy Target, Source ' Copy source to target.
Set FSo = CreateObject("Scripting.FilesystemObject")
Set Fil2 = FSo.GetFile(Target)
Fil2.Delete
Exit Sub
Err_handler:
MsgBox Err.Description, vbCritical, "Error"
End Sub
Data Compression: If you previously deleted large amounts of data, run this procedure to reclaim di Comments
No comments yet — be the first to post one!
Post a Comment