bernhard7gruber
Member
- Joined
- Aug 11, 2003
- Messages
- 5
I want to build a datarelation between an
SQL-Table and an XML-Document.
The task is to filter the table (about 10000 records) with a list of ID-Values (about 100) presented in the XML-Doc
I create the relation by joining the two tables of the dataset grafically in the designer and this works fine.
But when i try to call
sqlDataAdapter.Fill (dataset)
i get an error telling me, that either the non-null, the unique or the foreign-key constraint are violated
can anybody tell me why ??
i think my code will not help a lot here, but anyway:
DataSet11.ReadXml("D:\develop\.NET\TESTPROJEKTE\heroldTests\heroldTests\joinTableAndXML5\slave.xml")
childCol = DataSet11.Tables("zbz").Columns("ZAEHLB_ID")
parentCol = DataSet11.Tables("slave").Columns("ZAEHLB_ID")
Dim relMasterSlave As DataRelation
relMasterSlave = New DataRelation("masterslave", parentCol, childCol)
DataSet11.Relations.Add(relMasterSlave)
SqlDataAdapter1.Fill(DataSet11)
SQL-Table and an XML-Document.
The task is to filter the table (about 10000 records) with a list of ID-Values (about 100) presented in the XML-Doc
I create the relation by joining the two tables of the dataset grafically in the designer and this works fine.
But when i try to call
sqlDataAdapter.Fill (dataset)
i get an error telling me, that either the non-null, the unique or the foreign-key constraint are violated
can anybody tell me why ??
i think my code will not help a lot here, but anyway:
DataSet11.ReadXml("D:\develop\.NET\TESTPROJEKTE\heroldTests\heroldTests\joinTableAndXML5\slave.xml")
childCol = DataSet11.Tables("zbz").Columns("ZAEHLB_ID")
parentCol = DataSet11.Tables("slave").Columns("ZAEHLB_ID")
Dim relMasterSlave As DataRelation
relMasterSlave = New DataRelation("masterslave", parentCol, childCol)
DataSet11.Relations.Add(relMasterSlave)
SqlDataAdapter1.Fill(DataSet11)