Frage

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>
War es hilfreich?

Lösung

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>

Andere Tipps

<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" /
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top