Strange configuration choices -
02-11-2009
, 07:25 PM
I have converted a table from autnums to natural keys and suddenly my
application goes totally wrong. I cannot commit any changes.
I am using the generated typesafe classes and the generated classes are
set up so that they give you:
The record cannot be deleted or changed because table YYY includes related
records
I found this:
http://www.devnewsgroups.net/group/
microsoft.public.dotnet.framework.adonet/topic46811.aspx
quote:
parent table has a primary key parent_id
child table has a primary key parent_id, child_id
foreign key is defined for parent_id
dataset generated with all the propery keys and relationships
I get the error when trying to update the parent table unless i manually
change the Dataset.Designer.vb to remove the parent_id from the set
portion
of the update command.
endquote:
Why does the generated SQL update statements automatically include the
primary key that automatically breaks the ability to update the records
if it is a primary key on another relationship.
Is there a fundamentally better design here? This has cost me a couple
of days figuring it out.
Ta
Ken |