Gridview error: Failed to enable constraints. One or more rows contain values violating non-null, u

  • Thread starter Thread starter Bobby Edward
  • Start date Start date
B

Bobby Edward

I have a gridview that is databound to an objectdatasource. The ODS
utilizes a XSD Dataset that was created.

I keep getting this error when viewing the page: Failed to enable
constraints. One or more rows contain values violating non-null, unique, or
foreign-key constraints.

The query (MySQL) works fine thru the query tool.

I MANUALLY checked the data and it is fine as well.

Here's the actual query...
SELECT DISTINCT companytypes.CompanyType, users.Company,
users.CompanyTypeId, users.ContactAddress1, users.ContactAddress2,
users.ContactCity,users.ContactState, users.ContactZip, users.ContactPhone,
users.ContactFax, users.CompanyDescription
FROM users INNER JOIN companytypes ON users.CompanyTypeId =
companytypes.CompanyTypeId
ORDER BY companytypes.CompanyType, users.Company

Any ideas?
 
Hi Bobby,
Suggest go over the xsd with a fine tooth comb checking the Unique and
NullValue properties
good luck.
Bob
 
Back
Top