title: I'm Getting an Exception about Connecting My SQL Server
body: <pre><code>    private void frmResibo_Load(object sender, EventArgs e)
      {
  
          market m = new market();
          string cs = @"Data Source =.localhost; Initial Catalog = thesisdb; User ID=root; Integrated Security = true";
          SqlConnection cn = new SqlConnection(cs);
          SqlDataAdapter da = new SqlDataAdapter("select * from tbl_itemlist", cn);
          da.Fill(m, m.Tables[0].TableName);
  
  
  
           ReportDataSource rds = new ReportDataSource("tbl_itemlist", m.Tables[0]);
           this.reportViewer1.LocalReport.DataSources.Clear();
           this.reportViewer1.LocalReport.DataSources.Add(rds);
           this.reportViewer1.LocalReport.Refresh();
  
           this.reportViewer1.RefreshReport();
  
      }
  </code></pre>
  
  <p>I Got an error like this in line <code>"da.Fill---</code></p>
  
  <blockquote>
    <p>System.Data.SqlClient.SqlException: 'A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)'</p>
  </blockquote>