2014-02-12 48 views
0

如何在下文提到的連接字符串添加密碼如何添加密碼的連接字符串

<connectionStrings> 
    <add name="Gate_App.My.MySettings.GateDbConnectionString1" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\GateDb.accdb;Persist Security Info=True " 
     providerName="System.Data.OleDb" /> 
</connectionStrings> 
+0

http://www.connectionstrings.com/ace-oledb-12-0/with-database-password/ –

回答

0

使用此 <connectionStrings> <add name="Gate_App.My.MySettings.GateDbConnectionString1" connectionString=" Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\GateDb.accdb; User ID=*******; Password='*******';Persist Security Info=True " providerName="System.Data.OleDb" /> </connectionStrings>

0

試試這個,

<add name="Gate_App.My.MySettings.GateDbConnectionString1" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\GateDb.accdb;User Id=id;Password=pass;" providerName="System.Data.OleDb"/
0
<connectionStrings> 
    <add name="Gate_App.My.MySettings.GateDbConnectionString1" connectionString="Provider=Microsoft.ACE.OLEDB.12.0; 
Data Source=|DataDirectory|\GateDb.accdb;Persist Security Info=True;User ID=myUsername;Password=myPassword;" 
      providerName="System.Data.OleDb" /> 
    </connectionStrings> 

Access connection strings