title: DataAdapter.Fill gives error "Could not find server 'System' in sys.servers."
body: <p>I'm trying to get some values from my SQL Server database, I can connect to it with:</p>
  <pre><code>SqlConnection conx = new SqlConnection();
  SqlConnection conx4 = new SqlConnection(&quot;Data Source=.\\Sistema_Deci;Initial Catalog=sistema_decisiones_financieras;Persist Security Info=True;User id=sa;Password=somepassword;timeout=120;&quot;);
  conx = conx4;
  
  conx.Open();
  conx.Close();
  </code></pre>
  <p>Up to that point it goes perfectly, however when I try to get values from it it goes wrong, code is following:</p>
  <pre><code>try
  {
      SqlCommand cmd2 = new SqlCommand(&quot;SELECT * FROM Ordenes_Servicios&quot;, conx);
      SqlDataReader reader1;
      DataTable dtordenes = new DataTable();
  
      conx.Open();
  
      SqlDataAdapter sqlDA = new SqlDataAdapter(cmd2.ToString(), conx.ConnectionString);
      sqlDA.Fill(dtordenes);  // &lt;--- at this point the error occurs
  
      conx.Close();
  }
  catch(Exception ex)
  {}
              
  </code></pre>
  <p>The exception is:</p>
  <blockquote>
  <p>System.Data.SqlClient.SqlException (0x80131904): Could not find server 'System' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.</p>
  </blockquote>
  <p>So far I've tried this on SQL Server to see the name of the servers, obviously there isn't any &quot;System&quot; server in the results, however I don't get why is it trying to connect to 'System' Instead of 'Sistema_Deci'</p>
  <pre><code>select name from sys.servers
  </code></pre>
  <p>Oh my Visual Studio is 2017 (Same problem with 2019) and running SQL Server 2019 Express since I couldn't install 2014 which is the one I've been using so far (idk why, but it started throwing errors while installing 2014).</p>
  <p>I got one way that worked out, however that's not how I'm trying to program it because it's a lot of extra work to map everything out</p>
  <pre><code>SqlCommand cmd2 = new SqlCommand(&quot;SELECT * FROM Ordenes_Servicios&quot;, conx);
  
  SqlDataReader reader1;
  DataTable dtordenes = new DataTable();
  
  dtordenes.Columns.Add(&quot;ID&quot;);
  dtordenes.Columns.Add(&quot;Cliente&quot;);
  
  conx.Open();
  
  reader1 = cmd2.ExecuteReader();
  
  while (reader1.Read())
  {
      string temp = reader1[&quot;ID_Reporte&quot;].ToString();
      string temp2 = reader1[&quot;Cliente&quot;].ToString();
      dtordenes.Rows.Add(temp, temp2);
  }
  </code></pre>