Where to add the connection string in a C# project? Like this string?
<connectionStrings>
<add name="strConn"
connectionString="Data Source=abc;Password=pass;User ID=user"
providerName="Oracle.DataAccess.Client">
</add>
</connectionStrings>
And how can I call it from my program.cs file?
This will be added in the configuration file. If it is an ASP.NET application, then this would be the
web.configfile. If it is a Winforms/Console application this would be theapp.configfile.To call it from the application, you’d have to use the
System.Configurationnamespace like so:Where
"yourConnStringName"is the name of yourconnectionStringin your config file.