Has anyone used a diffgram generated from a dataset to update Sql Server tables with a parent/child relationship. If I pass a diffgram containing just one table to work with, everything is fine. However, if a send one that has child records to delete first, it seems to ignore the "parentid" attribute that correctly gets generated from the dataset. I can see this in Sql Profiler.
If I capture the diffgram and create a template xml file from it (adding the root tag and schema attribute) and post it via url from my browser, it works fine! Sql Profiler shows the child records getting deleted first. I think (hope) this means I'm doing something wrong in my code. Does anyone have any suggestions? This is the schema I use. This is used to create the dataset. <xs:schema xmlns="http://tempuri.org/Schedule.xsd" xmlns:mstns="http://tempuri.org/Schedule.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:sql="urn:schemas-microsoft-com:mapping-schema" elementFormDefault="qualified" id="Schedule"> <xs:annotation> <xs:appinfo> <sql:relationship name="UDTScheduleUDTScheduleItem" parent="UDTSchedule" parent-key="ShopOrderNumber ReleaseYear" child="UDTScheduleItem" child-key="ShopOrderNumber ReleaseYear"/> </xs:appinfo> </xs:annotation> <xs:element name="Order" sql:relation="UDTSchedule"> <xs:complexType> <xs:sequence> <xs:element name="ScheduleItems" sql:relation="UDTScheduleItem" sql:relationship="UDTScheduleUDTScheduleItem"> <xs:complexType> <xs:attribute name="ReleaseYear" type="xs:string"/> <xs:attribute name="ShopOrderNumber" type="xs:string"/> <xs:attribute name="LocationID" type="xs:string"/> <xs:attribute name="Status" type="xs:string"/> <xs:attribute name="QtyCompleted" type="xs:int"/> <xs:attribute name="QtyRemaining" type="xs:int"/> <xs:attribute name="UpdateDate" type="xs:dateTime" sql:datatype="datetime"/> <xs:attribute name="CreateDate" type="xs:dateTime" sql:datatype="datetime"/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="LineName" type="xs:string"/> <xs:attribute name="ShopOrderNumber" type="xs:string"/> <xs:attribute name="MaterialName" type="xs:string"/> <xs:attribute name="QtyRequired" type="xs:int"/> <xs:attribute name="DateRequired" type="xs:dateTime" sql:datatype="datetime"/> <xs:attribute name="CutToQty" type="xs:int"/> <xs:attribute name="SuspendAtQty" type="xs:int"/> <xs:attribute name="UpdateDate" type="xs:dateTime" sql:datatype="datetime"/> <xs:attribute name="CreateDate" type="xs:dateTime" sql:datatype="datetime"/> <xs:attribute name="Sequence" type="xs:int"/> <xs:attribute name="SeriesName" type="xs:string"/> <xs:attribute name="ReleaseYear" type="xs:string"/> </xs:complexType> </xs:element> </xs:schema> Adam Hodge Flexware Innovation, Inc. Office: 317-773-1500x242 Mobile: 317-435-8406 [EMAIL PROTECTED] http://www.flexwareinnovation.com <http://www.flexwareinnovation.com/> Flexware Innovation... Cultivating Manufacturing Success Adam Hodge Flexware Innovation, Inc. Office: 317-773-1500x242 Mobile: 317-435-8406 [EMAIL PROTECTED] http://www.flexwareinnovation.com <http://www.flexwareinnovation.com/> Flexware Innovation... Cultivating Manufacturing Success =================================== This list is hosted by DevelopMentorŪ http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com