Forum Moderators: open

Message Too Old, No Replies

VS.Net

Issues with XML Schema

         

RossWal

9:56 pm on Dec 1, 2003 (gmt 0)

10+ Year Member



In the visual design environment, I created a schema with 2 tables. The parent table has an ID attribute, and the child has an ID and also a USER. I made a key on the parent using ID, and a key on the child, using ID and USER. Next I added a data relationship with the Key and Foreign Key of ID.

I'm getting an error when I try to store a duplicate ID in the child, even though the user is different. It seems to be enforcing uniqueness on ID instead of the combination of ID and ID and USER.

Interestingly, the error is onlly raised when I store the data programatically (asp.net). Using the data entry tool in the IDE, it seems to be fine.

Any thoughts before I finish clawing my eyeballs out?

Thanks,
Ross

RossWal

12:55 am on Dec 2, 2003 (gmt 0)

10+ Year Member



Aha! I had not identified my 2 column key in the child table as the primary key. Apparently VS.net chose a single column primary key on my behalf, thus the violation of uniqueness. Sheeze, I don't care to think of the time I've spent on this.......