>>Aren't there any other user or apps in that database? How do you compact the database? I think you are using ADO, see this:
http://support.microsoft.com/support/kb/articles/Q230/5/01.ASP>
>I tried the suggested method from the web site, but hit error as follows:
>
>Could not find installable ISAM
You need ADO 2.1 or higher.
>
>But I use the other method is OK as follows:
>
>DBEngine.CompactDatabase "c:\TTD.mdb", "c:\TTDComp.mdb", dbLangGeneral, _
>dbVersion40, ";pwd=abc"
>Kill "c:\TTD.mdb"
>Name "c:TTDComp.mdb" As "c:\TTD.mdb"
>
>Any difference between these two methods, which is better one? Thanks.
Both have the same result. If you use ADO, I prefer the first way. If you use DAO, I prefer the DBEngine way.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com