Exception

abhi.944

New member
Joined
Jul 18, 2006
Messages
3
Programming Experience
Beginner
here is second major problem i m facing...

I m building an appication (RSS Reader)... now i have a dataset where i have 3 tables (attached to my main database via three tableAdaptors for each table) wid load event of my main form i fill each table appropriately from database.... via fill procedures of TableAdaptors

now my three tables are like Folders , Channels, News_Items..
now problems in tht chaneels has a foreign key from folders (Folder ID ) and news_Item has a foreign key from Channels (Channel_ID)


Now i have a dialog box where user cn delete his channels. now.. in the dialog_load event of dialog
I try to fill a combobox having various channels.. i create a dataset refrencing my project dataset, a table adaptor and a binding source on dialog (form representing dialog) and then i choose binding source of combobox to be the bindinsource whose source in dataset->channels folder...
now when i try to fill the dataset->channel table in the dialog_load event i m getting following exception

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

I dn't knw why it's occuring..my table is pretty clean ... moreover as i already mentioned.. i fill the same table in main_form_load event via a tableadaptor. I also have a similiar dialog box.. with folders (Folder_Delete.vb) i did everything same there.. except binding combobox to dataset->folders table instead.. it's working absolutely fine there...

i think because i hav a two foreign key constraint one (from folders table)and another to (news_Item) from channels i have to have some more binding sources.. anyways i m relatively new to ADO.NET.. . so i may be wrong...

please please please.. suggest some remedy.. i m stuck here big time... my application ws to complete by now.. but i m stuck on this stupid.. error.... (Exception) ...

Kindly reply soon...
 
Back
Top