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>
Was it helpful?

Solution

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>

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>

Access connection strings

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
scroll top