Select the product you need help with
ACC2000: How to Change the Database Password Through ADOArticle ID: 304915 - View products that this article applies to. This article was previously published under Q304915 Advanced: Requires expert coding, interoperability, and multiuser skills.
This article applies only to a Microsoft Access database (.mdb). SUMMARY
With Microsoft Jet version 4.0, you can change the database password by running a data-definition query. Because you can do this, it is relatively easy to set the database password through ActiveX Data Objects (ADO). This article shows you how to set the database password, and then how to resetting the database password to a blank password. NOTE: To set or reset the database password, you must have the database open exclusively. MORE INFORMATIONSetting the Database PasswordThe following ADO example assumes that the current database has a blank database password.NOTE: The sample code in this article uses Microsoft ActiveX Data Objects. For this code to run properly, you must reference the Microsoft ActiveX Data Objects 2.x Library (where 2.x is 2.1 or later.) To do so, click References on the Tools menu in the Visual Basic Editor, and make sure that the Microsoft ActiveX Data Objects 2.x Library check box is selected.
Resetting the Database Password to a Blank PasswordYou can use the following code sample to reset the password to a blank database password. To set the blank password, you must use the NULL keyword. This example also assumes that the current database has a database password set as DBPassword.
REFERENCESFor additional information about other new features of Microsoft Jet 4.0, click the article number below
to view the article in the Microsoft Knowledge Base:
275561 For more information about data-definition queries, click Microsoft Access Help on the
Help menu, type what is an sql query and when would you used one? in the Office Assistant or
the Answer Wizard, and then click Search to view the topics
returned.
(http://support.microsoft.com/kb/275561/EN-US/
)
New Features in Microsoft Jet 4.0
PropertiesArticle ID: 304915 - Last Review: November 19, 2008 - Revision: 5.1
|


Back to the top








