Code To eliminate need to enter password

前端 未结 1 1303
走了就别回头了
走了就别回头了 2020-12-22 05:19

I have an access form that pulls together data from different tables. Some of them require a username and password be entered. This is going out to other users and I would r

相关标签:
1条回答
  • 2020-12-22 05:46

    The literal answer is; no. You can't make a password form autofill. However, you can set up your connection string so that no one has to fill it in.

    'Set up the connection string
            strConn = "PROVIDER=SQLOLEDB;DATA SOURCE=MyServerName;INITIAL CATALOG=MyDatabaseName;UID=MyStandardUserID;PWD=MyStandardPassword;"
            cnComments.Open strConn
    

    You can also set it up without the username and password:

    'Set up the connection string
            strConn = "PROVIDER=SQLOLEDB;DATA SOURCE=MyServerName;INITIAL CATALOG=MyDatabaseName;TRUSTED_CONNECTION=yes;"
            cnComments.Open strConn
    
    0 讨论(0)
提交回复
热议问题