Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dataset relationships

Status
Not open for further replies.

slwolf8

Technical User
Apr 23, 2001
82
US
I have 2 tables in a dataset. Vendors (vendorid, vendor) and Invoices (InvoiceID, InvoiceNo, VendorID). I created a relationship making vendors the parent table and invoices the child table (with vendorid the primary key in vendors and the foreign key in invoices). If I preview data on the data adapter for the vendors table (daVendors) it looks fine. I get the little + sign next to the records that show me th related child records that are in the invoices table. However, if I try to preview data on the data adapter for the invoices table I get the "failed to enable constraints" error. Are you only supposed to be able to preview the data of the parent table?

I found this method on the internet someone wrote to use when getting the failed to enable constraints error. It writes the errors to the output window. The errors stated that I had values in the vendorid column in the invoices table that did not exist in the vendors table. I checked and they do exist. I'm at a loss here....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top