5
Answers

Connection Error

Jagjit Saini

Jagjit Saini

13y
1.3k
1
Hi

   In Windows Application 

  

   string

it is giving error

App.Config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <connectionStrings>
    <add name="cnn"
    connectionString="Persist Security Info=False;
    Data Source=localhost;
    Initial Catalog=hr;
    Integrated Security=SSPI;
    Trusted_Connection=TRUE;
    Application Name=SampleCSharpApplication" />
  </connectionStrings>
</configuration>

Thanks

ConnectionString = ConfigurationSettings.AppSettings["cnn"];

Answers (5)