Re: Constraint error on DataSet filll

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Corey Wirun (corey.wirun_at_nospam.ca)
Date: 06/11/04


Date: Fri, 11 Jun 2004 14:45:17 GMT

Hi William,

No, I need the two SELECTs. The table RPDCY_T defines endpoints for
pipelines. It's possible the source endpoint for one pipe can be the
destination endpoint for another. The intention of the query is to return
me a list of all endpoints for all pipes, with dups removed (i.e. the
UNION).

How do you set the nullable property in the XML for non-key columns? I set
it on the key for PageData in the XML, but it didn't make a difference.

Thanks for the reply.
Corey.

"William Ryan eMVP" <dotnetguru@comcast.nospam.net> wrote in message
news:uTKBYr2TEHA.2464@TK2MSFTNGP10.phx.gbl...
> Corey:
>
> If you skip the union and just call fill with each respective query on the
> same datatable, will it work? This isn't the problem, but I'd verify that
I
> can get at least one of the select statements in there. My guess is that
> one of your fields somewhere is violating a rule.
>
> I know you've checked this but I've had trouble a few times in a similar
> situation. Make sure nothing in the xml is indicating that nulls aren't
> allowed too.
>
> --
> W.G. Ryan MVP Windows - Embedded
>
> http://forums.devbuzz.com
> http://www.knowdotnet.com/dataaccess.html
> http://www.msmvps.com/williamryan/
> "Corey Wirun" <corey.wirun@nospam.ca> wrote in message
> news:rx4yc.25284$NT6.7880@clgrps13...
> > 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>
> > ...
> >
> >
>
>



Relevant Pages

  • Re: Isoch Read/Write with loopback (newbie)
    ... > ngdong@gmail.com (dongnh) wrote: ... If your device uses different pipe numbers, ... //check if device in full speed state ... Using USBView, I see that there are only 2 bulk endpoints, 2 int ...
    (microsoft.public.development.device.drivers)
  • Re: IDS Correlation
    ... Silly suggestion but could you use XML, but simply setup both endpoints to ... rip/replace XML tags as needed by agreeing on a standard format, ...
    (Focus-IDS)