Nate1
11-20-2007, 05:37 AM
I Have a Dataset Ive hooked up to a FormView, there is an Error that is occuring within the page and I think it is coming from the Dataset,
Basically it says
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
But Ive checked the database, 3 records cause the error out of 89 (Test Data), each of the three records are different (there are three types with many different features), I've checked all relations and nothing looks out of place, No foreign keys are unreferenced
heres some of the SQL Ive used to look over the records, its meaningless, but ive checked these records over for anything I can think of and have found nothing, How can I capture the exception from the Dataset, to hopefully get a more detailed description of the error.
All the results add up and look just like 3 other random records?
select * From Listing where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From Contact where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From Comment where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From Event where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From Listing_IMages where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From Listing_Category where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From ListingLink where ilistingOneID = 2 OR ilistingOneID = 60 OR ilistingONeID = 89
select * From ListingLink where ilistingTwoID = 2 OR ilistingTwoID = 60 OR ilistingTwoID = 89
Select * from Trade_Category where EXISTS(
select * From Listing_Category where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89 and Listing_Category.iCategoryID = Trade_Category.iCategoryID)
Basically it says
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
But Ive checked the database, 3 records cause the error out of 89 (Test Data), each of the three records are different (there are three types with many different features), I've checked all relations and nothing looks out of place, No foreign keys are unreferenced
heres some of the SQL Ive used to look over the records, its meaningless, but ive checked these records over for anything I can think of and have found nothing, How can I capture the exception from the Dataset, to hopefully get a more detailed description of the error.
All the results add up and look just like 3 other random records?
select * From Listing where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From Contact where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From Comment where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From Event where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From Listing_IMages where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From Listing_Category where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89
select * From ListingLink where ilistingOneID = 2 OR ilistingOneID = 60 OR ilistingONeID = 89
select * From ListingLink where ilistingTwoID = 2 OR ilistingTwoID = 60 OR ilistingTwoID = 89
Select * from Trade_Category where EXISTS(
select * From Listing_Category where ilistingID = 2 OR ilistingID = 60 OR ilistingID = 89 and Listing_Category.iCategoryID = Trade_Category.iCategoryID)