ACC95: DB Password with Space Becomes Invalid After Compact

Last reviewed: July 22, 1997
Article ID: Q152760
The information in this article applies to:
  • Microsoft Access version 7.0

SYMPTOMS

When you set a database password that contains one or more spaces, the password becomes invalid after you compact the database.

CAUSE

When Microsoft Access 7.0 compacts your database, it removes all characters after and including the first space it encounters in the database password.

RESOLUTION

Choose a database password that does not contain spaces, or reset the database password you want every time you compact the database.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 7.0. This problem no longer occurs in Microsoft Access 97.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new, blank Microsoft Access 7.0 database.

  2. Create a database password for the new database. To do so, follow these steps:

        a. Close the database.
    

        b. On the File menu, click Open Database.
    

        c. Click the Exclusive check box, and then open the database.
    

        d. On the Tools menu, point to Security, and then click Set Database
           Password.
    

        e. In the Password box, type this password: "New Password" (without
           the quotation marks). Be aware that passwords are case-sensitive.
    

        f. In the Verify box, confirm your password by typing the password
           again, and then click OK.
    

    The password is now set. The next time you or another user opens the database, a dialog box will be displayed that requests a password. (Remember that a password is case-sensitive; you must type it exactly as defined.)

  3. Close the database and reopen it. When prompted, type the database password: "New Password" (without the quotation marks). The database will open without any problems.

  4. Close the database again. On the Tools menu, point to Database Utilities, and then click Compact Database. Select the new database in the "Database To Compact From" dialog box, and type the password when prompted. Select the same database name in the "Compact Database Into" dialog box, and click Yes to "Replace existing file" prompt.

  5. Open the database and try to use the password: "New Password" (without the quotation marks). Note that you receive the following error message:

          "Not a valid password"
    

    Click OK and try again. This time use the password: "New" (without the quotation marks).

  6. Note that the database will open because Microsoft Access removed all characters in the password after the word "New" when the database was compacted.

REFERENCES

For more information about database passwords, search on the phrase "database password," and then view "Protect a database by adding a database password" using the Answer Wizard from the Microsoft Access for Windows 95 Help menu.


Additional query words: database security truncate
Keywords : kbusage ScrtImpl
Version : 7.0
Platform : WINDOWS
Hardware : X86
Issue type : kbbug
Resolution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.