Microsoft Knowledge Base Email Alertz

KBAlertz.com: (101084) - Advanced: Requires expert coding, interoperability, and multiuser skills. Storing SQL database login IDs and passwords locally requires that the database administrator create a unique table on the server. In Microsoft Access, when you link (or...

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]






Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

ACC: Storing SQL Database Login IDs and Passwords Locally

Retired KB ArticleThis 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.
Article ID:101084
Last Review:January 18, 2007
Revision:2.2
This article was previously published under Q101084

SUMMARY

Advanced: Requires expert coding, interoperability, and multiuser skills.

Storing SQL database login IDs and passwords locally requires that the database administrator create a unique table on the server.

MORE INFORMATION

In Microsoft Access, when you link (or attach in Microsoft Access 2.0 or earlier) a SQL database table, you can choose whether you want Microsoft Access to store your login ID and password locally. If you do not, Microsoft Access prompts you for your login ID and password each time that you connect to the SQL database containing the table.

If you want Microsoft Access to store the connection information in your Microsoft Access database so that you do not have to type it each time, you can click to select the Save Login ID And Password Locally check box in the Attach Tables dialog box when you link the SQL database table.

For Microsoft SQL Server, Sybase SQL Server, and ORACLE Server databases, your SQL database administrator can choose to disable this feature, requiring all users to enter their login IDs and passwords each time they connect to a SQL database.

To disable the ability to store login IDs and passwords locally, your SQL database administrator must create a table called MSysConf in the SQL database. When a user connects to the SQL database, Microsoft Access looks for this table in the database and, if it finds it, queries the table. If the values in the table correctly specify that local storing of login IDs and passwords should be disabled, Microsoft Access does so, regardless of whether the Save Login ID And Password Locally check box is selected. If the table is not present or does not specify disabling of the feature, users can store login IDs and passwords locally.

The SQL database table MSysConf should have the following structure.
   Column name   Data type                                 Allows Null?
   --------------------------------------------------------------------
   Config        A data type that corresponds to a         No
                 2-byte integer

   chValue       VARCHAR(255)                              Yes

   nValue        A data type that corresponds to a
                 4-byte integer                            Yes

   Comment       VARCHAR(255)                              Yes
				

If the data source you are working with is case-sensitive, use the table and column names exactly as shown. All users must have permission to use the SELECT statement on this table and only the system administrator can have permission to use the DELETE statement on this table.

In ORACLE, there are a few things that are different. For instance, the word "Comment" is reserved in ORACLE, so you will need to change it to "Comments." The other change relates to a difference in data types. Here is how the table would appear in an ORACLE database:
   CONFIG          NUM(4,0)         NOT NULL
   CHVALUE         VARCHAR(255)
   NVALUE          NUM(5,0)*
   COMMENTS        VARCHAR(255)
				

Nvalue can have a precision of up to Num(9,0).

To disable password and login ID storage, the table should have only one row as follows:
   Column name     Value    Explanation
   --------------------------------------------------------------------
   Config          101      This is the only valid value for Microsoft
                            Access version 1.1.

   chValue         NULL     This is reserved for future use.

   nValue          0 or 1   Use 0 to prevent the password and login ID
                            from being stored; use 1 to permit
                            password and login ID storage as in
                            version 1.0. The default is 1.

   Comment                  Allow storage of passwords and login IDs in
                            Microsoft Access.
				

APPLIES TO
•Microsoft Access 1.0 Standard Edition
•Microsoft Access 1.1 Standard Edition
•Microsoft Access 2.0 Standard Edition
•Microsoft Access 95 Standard Edition
•Microsoft Access 97 Standard Edition

Back to the top

Keywords: 
kbhowto kbusage KB101084
   

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please