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

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?
 
B

bob

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top