0

Possible Duplicate:
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints

I The load event i wrote this code:

private DataSet1 ds1 = new DataSet1();
private SqlDataAdapter da1 = new SqlDataAdapter();
ds1.Clear();
da1 = new SqlDataAdapter("select * from Département, division,Sérvice where Département.Num_Département = Division.Num_Département_Département and Sérvice.Num_Division_Division = Division.Num_Division", sql.cn);
da1.Fill(ds1, "Sérvice");
da1.Fill(ds1, "Division");
da1.Fill(ds1, "Département");

but when i run the form it gives me this error :

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

What am I have to do ?

Community
  • 1
  • 1
Croviajo
  • 253
  • 1
  • 8
  • 17
  • The first think i thought about are the wierd letters <é> in all names, i would feel much better if i would eliminate these – CloudyMarble Aug 07 '12 at 05:40
  • but this requet works fine in SQL-Server. I have in another form the same requet and it works, but when i fill a dataTable. – Croviajo Aug 07 '12 at 05:45
  • try to run it usign a simple select with table like only "select * from Département" and da1.Fill(ds1, "Division"); does it work? – CloudyMarble Aug 07 '12 at 05:49
  • no .. the same problem .. i think because i have a row that contins a NULL value – Croviajo Aug 07 '12 at 05:55

0 Answers0