title: SQL Query works in management studio but not in C#
body: <p>I have a problem doing a query with my software...</p>
  
  <p>I have a function which builds my query, and then execute it to fill a gridview. But it keep throwing me an exception : "The multi-part identifier ""  could not be bound" with several columns.</p>
  
  <p>When I try the query in SQL Management Studio, it just works fine. I really don't understand. Here's the query.</p>
  
  <pre><code>SELECT DISTINCT [NonConformite].[Numero],
  CAST ([NonConformite].[Numero] AS varchar (255)) AS Champ1, 
  CAST ([NonConformiteDonneesComplementaires177_4].[Texte2] AS varchar (255)) AS Champ2, 
  CAST (NonConformite.dbo.[NonConformiteStatut].[Libelle] AS varchar (255)) AS Champ3, 
  CAST ([NonConformite].[Description] AS varchar (255)) AS Champ4 FROM [NonConformite].[dbo].[NonConformite]  
  LEFT JOIN NonConformite.dbo.[NonConformiteDonneesComplementaires] as NonConformiteDonneesComplementaires177_4 
  ON [NonConformite].[Numero] = [NonConformiteDonneesComplementaires177_4].[Numero] 
  LEFT JOIN NonConformite.dbo.[NonConformiteStatut] 
  ON [NonConformite].[CpteurStatut] = NonConformite.dbo.[NonConformiteStatut].[Cpteur]
  </code></pre>
  
  <p>I work on Windows 7 Pro, with Visual Studio 2008, SQL Server 2008 and in ASP.NET C#.</p>
  
  <p>Thank you for your answers !</p>