Jagjit Saini

Jagjit Saini

  • NA
  • 166
  • 0

Connection Error

Sep 2 2011 2:31 AM
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)