bernhard7gruber Posted August 11, 2003 Posted August 11, 2003 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) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.