Use this
<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>
How to add password connection string
-
10-10-2022 - |
Question
How to add password in below mentioned connection string
<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>
Solution
OTHER TIPS
<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>
Try this,
<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" /
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow