Article ID: 270638
When a Microsoft Access database is password protected, attempts to compact the database using the SQLConfigDataSource ODBC API might fail with the following error message:
The error message occurs even if you specify the password information in the Attributes list as follows:
"Not a valid password"
To work around this problem, use the Microsoft OLE DB Provider for Jet or Data Access Objects (DAO) directly and bypass the Microsoft Access ODBC Driver.
Samples follow that show how to achieve this functionality:
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
For additional information about the problem, and for information about a fix, click the article number below to view the article in the Microsoft Knowledge Base:
271177For additional information about compacting Microsoft Access databases, click the article numbers below to view the articles in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/271177/EN-US/ )Unable To Repair Password Protected Database Via ODBC Control Panel
(http://support.microsoft.com/kb/230496/EN-US/ )HOWTO: Compacting Microsoft Access Database Through OLE DB
(http://support.microsoft.com/kb/230501/EN-US/ )HOWTO: Compacting Microsoft Access Database via ADO
Article ID: 270638 - Last Review: June 19, 2014 - Revision: 3.0
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Contact us for more help