| Ferey Cyril 2005-12-29, 7:23 am |
| Error message when I post a DiffGram from SQLXML
I set up on the database server a virtual directory template in which I placed following DiffGram
(SQL2000 with SQLXML 3 SP3
When I tried to excute this on the server, I' v got the error message
"ERROR: 500 Internal Server Error
HResult: 0x80040e14
Source : Microsoft XML Extensions to SQL Server
Description: Duplicate id values in the same before or after block are not permitted
"
I tried several configurations, it seems that the problem does not result from the schema but from the diffgram he even.
To note, that I know the others way of proceeding for the update but most for me is this one, thus this you could help me or send me some documentation ( Other than already (already gone through) msdn) it would be great.
DIFFGRAM
<ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql" sql:mapping-schema="../schema/fiches.xsd">
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet>
<Fiches diffgr:id="Fiches1" msdata:rowOrder="0" diffgr:hasChanges="modified" msdata:hiddenFiches_
Id="0">
<FicheID>3</FicheID>
<Titre>NouveauTitre2</Titre>
<Etat>test</Etat>
<Systeme>test</Systeme>
<Accroche>test</Accroche>
<Auteur>test</Auteur>
<MotsCles>test</MotsCles>
<ImageAccroche>test</ImageAccroche>
<Image>test</Image>
<Etapes diffgr:id="Etapes1" msdata:rowOrder="0" diffgr:hasChanges="modified" msdata:hiddenEtapes_
Id="0" msdata:hiddenFiches_
Id="0">
<EtapeID>1</EtapeID>
<Position>1</Position>
<Titre>Etape1</Titre>
<Accroche>Accroche1234</Accroche>
<fk_FicheID>3</fk_FicheID>
</Etapes>
</Fiches>
</NewDataSet>
<diffgr:before>
<Etapes diffgr:id="Etapes1" msdata:rowOrder="0" msdata:hiddenEtapes_
Id="0" msdata:hiddenFiches_
Id="0">
<EtapeID>1</EtapeID>
<Position>1</Position>
<Titre>Etape1</Titre>
<Accroche>Accroche123</Accroche>
<fk_FicheID>3</fk_FicheID>
</Etapes>
<Fiches diffgr:id="Fiches1" msdata:rowOrder="0" msdata:hiddenFiches_
Id="0">
<FicheID>3</FicheID>
<Titre>NouveauTitre</Titre>
<Etat>test</Etat>
<Systeme>test</Systeme>
<Accroche>test</Accroche>
<Auteur>test</Auteur>
<MotsCles>test</MotsCles>
<ImageAccroche>test</ImageAccroche>
<Image>test</Image>
</Fiches>
</diffgr:before>
</diffgr:diffgram>
</ROOT>
SCHEMA
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema" elementFormDefault="qualified" attributeFormDefault
="unqualified">
<xs:annotation>
<xs:appinfo>
<sql:relationship name="FichesEtapes" parent="Fiches" parent-key="FicheID" child="Etapes" child-key="fk_FicheID" inverse="false"/>
</xs:appinfo>
</xs:annotation>
<xs:element name="Etapes" sql:relation="Etapes" sql:key-fields="EtapeID" sql:relationship="FichesEtapes">
<xs:complexType>
<xs:sequence>
<xs:element name="EtapeID" sql:relation="Etapes" sql:field="EtapeID" sql:datatype="int">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:maxInclusive value="2147483647"/>
<xs:minInclusive value="-2147483648"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Position" default="0" nillable="true" sql:relation="Etapes" sql:field="Position" sql:datatype="int">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:maxInclusive value="2147483647"/>
<xs:minInclusive value="-2147483648"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Titre" nillable="true" sql:relation="Etapes" sql:field="Titre" sql:datatype="nvarchar">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Accroche" nillable="true" sql:relation="Etapes" sql:field="Accroche" sql:datatype="ntext">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="1073741823"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="fk_FicheID" nillable="true" sql:relation="Etapes" sql:field="fk_FicheID" sql:datatype="int">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:maxInclusive value="2147483647"/>
<xs:minInclusive value="-2147483648"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:key name="Etapes_PrimaryKey_0">
<xs:selector xpath="."/>
<xs:field xpath="EtapeID"/>
</xs:key>
</xs:element>
<xs:element name="Fiches" sql:relation="Fiches" sql:key-fields="FicheID">
<xs:complexType>
<xs:sequence>
<xs:element name="FicheID" sql:relation="Fiches" sql:field="FicheID" sql:datatype="int">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:maxInclusive value="2147483647"/>
<xs:minInclusive value="-2147483648"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Titre" nillable="true" sql:relation="Fiches" sql:field="Titre" sql:datatype="nvarchar">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Etat" sql:relation="Fiches" sql:field="Etat" sql:datatype="nvarchar">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Systeme" nillable="true" sql:relation="Fiches" sql:field="Systeme" sql:datatype="nvarchar">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Accroche" nillable="true" sql:relation="Fiches" sql:field="Accroche" sql:datatype="ntext">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="1073741823"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Auteur" nillable="true" sql:relation="Fiches" sql:field="Auteur" sql:datatype="nvarchar">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DateEnregistrement" nillable="true" sql:relation="Fiches" sql:field="DateEnregistrement" sql:datatype="datetime">
<xs:simpleType>
<xs:restriction base="xs:dateTime">
<xs:pattern value="\p{Nd}{4}-\p{Nd}{2}-\p{Nd}{2}T\p{Nd}{2}:\p{Nd}{2}:\p{Nd}{2}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DatePublication" nillable="true" sql:relation="Fiches" sql:field="DatePublication" sql:datatype="datetime">
<xs:simpleType>
<xs:restriction base="xs:dateTime">
<xs:pattern value="\p{Nd}{4}-\p{Nd}{2}-\p{Nd}{2}T\p{Nd}{2}:\p{Nd}{2}:\p{Nd}{2}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="MotsCles" nillable="true" sql:relation="Fiches" sql:field="MotsCles" sql:datatype="nvarchar">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ImageAccroche" nillable="true" sql:relation="Fiches" sql:field="ImageAccroche" sql:datatype="nvarchar">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Image" nillable="true" sql:relation="Fiches" sql:field="Image" sql:datatype="nvarchar">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element ref="Etapes" minOccurs="0" maxOccurs="unbounded" sql:relationship="FichesEtapes"/>
</xs:sequence>
</xs:complexType>
<xs:key name="Fiches_PrimaryKey_0">
<xs:selector xpath="."/>
<xs:field xpath="FicheID"/>
</xs:key>
<xs:keyref name=" Fiches_To_Etapes_FK_
Etapes_Fiches" refer="Fiches_PrimaryKey_0">
<xs:selector xpath="Etapes"/>
<xs:field xpath="fk_FicheID"/>
</xs:keyref>
</xs:element>
</xs:schema>
|