VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Compact Access Database

by www.itmodule.com (4 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 7th September 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Compact Access Database

Rate Compact Access Database



Dim db As Database
    Set db = OpenDatabase(srcdbPath)
    ' Show the properties of the original database.
    Debug.Print srcdbPath & ": Version:", db.Version
    Debug.Print "  CollatingOrder = " & db.CollatingOrder
    db.Close
    'if the file exist..kill it.
    If Dir(trdbPath) <> "" Then
        Kill trdbPath
    End If
    DBEngine.CompactDatabase srcdbPath, trdbPath, , dbEncrypt
    ' Show the properties of the compacted database
    Set db = DBEngine(0).OpenDatabase(trdbPath)
    Debug.Print trdbPath & ":Version:", db.Version
    Debug.Print "  CollatingOrder = " & db.CollatingOrder
    db.Close
    
End Sub

Download this snippet    Add to My Saved Code

Compact Access Database Comments

No comments have been posted about Compact Access Database. Why not be the first to post a comment about Compact Access Database.

Post your comment

Subject:
Message:
0/1000 characters