Multiple DataAdapter Update Problems

  • Thread starter Thread starter Matthew Hood
  • Start date Start date
M

Matthew Hood

I am having difficulties getting my DataAdapter to update records to my
Access database using OleDB
I have a form with:
1 Connection
3 DataAdapters (CompanyInfo, CompanyAddresses, CompanyPhoneNumbers)
1 Typed Dataset (Using those 3 tables and "1-2-Many" relationships
between CompanyInfo and CompanyAddresses & CompanyPhoneNumbers)
3 DataViews for each Table Filtered to show appropriate data.

I AM able to display AND update/insert/delete to the database, but only if I
modify 1 table at a time....
example:
#1: If I only change my company name and save the record, everything
works great.
#2: If I only add/delete/update addresses/phone numbers, everything
works great.
#3: If I change my company name AND add/delete/update addresses/phone
numbers, ONLY my company name gets updated.

The process I use to update my data is:
daCompanyInfo.Update(dsDataset)
daCompanyAddresses.Update(dsDataset)
daCompanyPhoneNumbers.Update(dsDataset)

I've also have tried this:
daCompanyInfo.Update(dsDataset.CompanyInfo)
daCompanyAddresses.Update(dsDataset.CompanyAddresses)
daCompanyPhoneNumbers.Update(dsDataset.CompanyPhoneNumbers)

As I mentioned above, I'm ONLY having problems when I change a value on my
"Master" table, AND adding/deleting/updating records to the "Child" tables."

Any ideas on what's happening?

All help is greatly appreciated,
TIA,
-Matt
 
Found my problem.
My constraints on the relationships where setup up as
Cascade/Cascade/Cascade instead of Cascade/Cascade/None
 

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

Back
Top