Hierarchial Update

  • Thread starter Gudni G. Sigurdsson
  • Start date
G

Gudni G. Sigurdsson

Hi.
I have recently started using VS2008 after having used VS2005 in the past.
I have problems with updating related tables in an Access database
(Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=F:\Fjarskiptabunadur\FjarskiptaBunadur.mdb). I have 2 tables:
Producers and Units, the former being the parent the latter the child table.
When I change e.g. the name of a producer (not a key column in that table)
and try to save the changes, I get a message like The record cannot be
deleted or changed because table 'Units' includes related records.
I have worked through the HierarchialUpdateWalkthrough
example with the Northwind database (tables Customers and Orders) and that
works as expected. In my own example, I think I am doing everything in the
same way as in the Northwind example with tableAdapterManager and everything.
The only difference is that the Northwind example works and mine doesn´t.

I have tried to solve this for some time now and would be very gtateful for
some comment.

Regards,
Gudni
 
G

Gudni G. Sigurdsson

Hi, again.
Today, I tried something else. I had come to suspect that my problems had
something to do with my operating on an Access database and not a SQL Server
database like the Northwind. In my Access database, I had defined relations
between the tables and enforced Referential Integrity. When I dropped this
requirement, my problems with Update disappeared. Now, this may not be the
proper thing to do, but at least it enabled me to continue. I would very
much appreciate a comment on this.

Regards,
Gudni
 

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

Top