Nou*_*rah 28 c# database ms-access connection-string database-connection
对于属性:
Persist Security Info=true
Run Code Online (Sandbox Code Playgroud)
和
Persist Security Info=false
Run Code Online (Sandbox Code Playgroud)
你能告诉我他们之间的区别是什么,如果我不把它放在我的连接中会发生什么?
connect.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=C:/Users/Nourah/Downloads
/Phase3/Salary.accdb;
Persist Security Info=False;";
Run Code Online (Sandbox Code Playgroud)
Sac*_*chu 41
即使你设置Persist Security Info= trueOR Persist Security Info=false
也不会在前面显示出差异.差异发生在背景
当Persist Security Info set to false安全敏感信息,如密码,不作为连接的一部分返回,如果连接是打开的或者一直处于打开状态.
如果设置Persist Security Info to True,Windows将记住连接字符串中指定的密码.
多数民众赞成.
Persist Security Info只有在连接字符串中提及用户名和密码时,设置true或false才会生效.如果您在connectionstring中提及用户名和密码并设置Persist Security Info为false则无法提取凭据.但如果你设置Persist Security Info为true而在连接字符串窗口中提供凭据将记住凭据,它可以在程序中提取
| 归档时间: |
|
| 查看次数: |
49659 次 |
| 最近记录: |