Hi,I have a listview in my form.
I succeed to populate it with this method:
public void RecupererToutesVilles()
{
SqlCommand _maRequeteSQL = new SqlCommand();_maRequeteSQL.CommandText =
"SELECT Pk_DaVille, Libelle, CodePostal, Fk_DaPays, PhxLibelle, MajLibelle FROM L_DaVille";
this.FillDataTable(_maRequeteSQL);
}
But in my listview, I have a foreign key of a country whereas I want to see the name of the country.
So I want my query to be like these.
_maRequeteSQL.CommandText = "SELECT Pk_DaVille, L_DaVille.Libelle, CodePostal, Fk_DaPays, F_DaPays.Libelle, L_DaVille.PhxLibelle, L_DaVille.MajLibelle FROM L_DaVille INNER JOIN F_DaPays ON (L_DaVille.Fk_DaPays = F_DaPays.Pk_DaPays)";
I tried to add a display field called F_DaPays.Libelle in the PopulationDataSourceSettings but I have an error.
Can someone help me please.
Regards,
David