adding a select distinct query to the tableadapter
Posted on 2009-05-07
I have created a stronly typed dataset that fills a datatable from the Northwind customers table...i.e. Fill,GetCustomers()
Now, I want to add a new cuery where I select the distinct countries from the same table
SELECT DISTINCT Coutry FROM customers
I can add this query to the existing tableadapter, but it gives me a warning that the schema is not the same. Then when I try to populate a dropdown with the FillCountries query, I get a constraint violation.
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
Thanks for any help.