C
Corey Wirun
Hi All,
I've got a strongly typed dataset that I'm trying to Fill in with an
adapter. The dataset has 3 tables in it, PageData, RowData and SummaryData.
I'm trying to ::Fill into PageData with the following SQL:
SELECT distinct SRC_DBINDEX, SRC_TAG, src_descript FROM RPDCY_T
UNION
SELECT distinct DST_DBINDEX, DST_TAG, dst_descript FROM RPDCY_T
And I get this famous error:
Failed to enable constraints. One or more rows contain values violating
non-null, unique, or foreign-key constraints.
The XSD schema has no keys or relations in it. The wierd part is that I can
run this in SQL EM and I see there are no NULL columns and no duplicates
anywhere in the result set.
How do people chase down these errors since the cause is hidden behind the
generic error message?
Thanks in Advance!
Corey.
Here's the XSD snippet for 'PageData':
....
<xs:element name="PageData">
<xs:annotation>
<xs:documentation>Page Heading Information</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="DBINDEX" type="xs:long">
<xs:annotation>
<xs:documentation>DBINDEX of PageData Object</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TAG">
<xs:annotation>
<xs:documentation>Name of PageData Object</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DESCRIPT">
<xs:annotation>
<xs:documentation>Description of PageData Object</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
....
I've got a strongly typed dataset that I'm trying to Fill in with an
adapter. The dataset has 3 tables in it, PageData, RowData and SummaryData.
I'm trying to ::Fill into PageData with the following SQL:
SELECT distinct SRC_DBINDEX, SRC_TAG, src_descript FROM RPDCY_T
UNION
SELECT distinct DST_DBINDEX, DST_TAG, dst_descript FROM RPDCY_T
And I get this famous error:
Failed to enable constraints. One or more rows contain values violating
non-null, unique, or foreign-key constraints.
The XSD schema has no keys or relations in it. The wierd part is that I can
run this in SQL EM and I see there are no NULL columns and no duplicates
anywhere in the result set.
How do people chase down these errors since the cause is hidden behind the
generic error message?
Thanks in Advance!
Corey.
Here's the XSD snippet for 'PageData':
....
<xs:element name="PageData">
<xs:annotation>
<xs:documentation>Page Heading Information</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="DBINDEX" type="xs:long">
<xs:annotation>
<xs:documentation>DBINDEX of PageData Object</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TAG">
<xs:annotation>
<xs:documentation>Name of PageData Object</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DESCRIPT">
<xs:annotation>
<xs:documentation>Description of PageData Object</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
....