How to compact an Access Database from VB
Posted on January 5, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 'Database - How to compact an Access Database from VB 'Add reference to DAO (Project -> References, select the Microsoft DAO 3.6 (or 3.51) Object Library) 'If you get "Unrecognized Database format" error message: 'If you using database that made in Access 2000 and you don't have Microsoft DAO 3.6 Object Library reference, 'click on browse, and select the file C:\Program Files\Common Files\Microsoft Shared\Dao\dao360.dll '(If you have Access 2000 installed in your computer you have this file.) 'This will add Microsoft DAO 3.6 Object Library reference to your project. Private Sub Main() DBEngine.CompactDatabase "C:\Temp\Test.mdb", "C:\Temp\Test1.mdb" End Sub |
Related posts:
- How to List all Tables from an Access Database
- How to set a password for an access database
- How to Import SQL Server data into an Access database
- How to change the password of an Access Database
- How to export data from the current database to a back-up database using Access Application
- How to Export an Access Database to HTML file
- How to Print MS Access Report
- How to Copy data from an Access database into an Excel spreadsheet using a SQL SELECT statement
- How to open a password protected access database using ADO
- How to Open a password-protected Access database with ADO