The same table cannot be the child table in two nested relations

dotnet framework

    Next

  • 1. Very basic stupid question
    Hi, I am trying to insert/update to a sql server and It does not either insert or updates but the code does not fail (it is doing something) any ideas? try { string connString = "Data Source=server1;Initial Catalog=Test;User ID=sa;Password=;"; SqlConnection myConnection = new SqlConnection(connString); SqlDataAdapter mysqlDataAdapter = new SqlDataAdapter("SELECT * from Links",myConnection); myConnection.Open(); DataSet myDataSet = new DataSet(); DataRow mydataRow; SqlCommandBuilder mySqlCommandBuilder =new SqlCommandBuilder(mysqlDataAdapter); mysqlDataAdapter.MissingSchemaAction=MissingSchemaAction.AddWithKey; mysqlDataAdapter.Fill(myDataSet,"Links"); myDataSet.Tables["Links"].Rows[0]["Name"] = "peach"; mydataRow = myDataSet.Tables["Links"].NewRow(); mydataRow["Name"] = "xxxx"; label2.Text = "inserted in the table"; myDataSet.Tables["Links"].Rows.Add(mydataRow); myConnection.Close(); } catch { label2.Text = "database insert failed "; }
  • 2. selecting between 2 access databases?
    here's the scenario: Database1.mdb with Table1 with Field1 Database2.mdb with Table1 with Field1 in vb.net, how can I return all of the Field1's from both tables/databases? I can create a dataset from each table, but how can I combine them into one? I want to load all instances of Field1 into a dropdown... thanks...
  • 3. Select using LIKE in VB .NET
    I am trying to create a select that uses the LIKE operator. If I leave off the where clause I get all the data but when I add the where with a LIKE I get nothing. If I paste it into access it runs fine. Am I missing something in the way it is formatted? Here is what I am using. strSQL = "SELECT CatalogID, tProductDescription, tDocument " strSQL &= "FROM tblCatalog WHERE tProductDescription LIKE '*SONIX*'" Try oCmd = New OleDb.OleDbCommand With oCmd .Connection = _ New OleDb.OleDbConnection(strConn) .Connection.Open() .CommandText = strSQL oDR = .ExecuteReader() End With... There are many rows with the word SONIX in them and like I said it works in access but not when I call access from VB. Thanks, John
  • 4. How to get rowID?
    Hello All, I have a problem with the Select() method of the datatable. I filter and sort the DefaultView of the datatable and then from that filtered and sorted table I extract one datarow at a time, I do like this: Dim drTasks() As DataRow drTasks = g_dsTasks.Tables("TasksToDo").Select("TaskID=14") Now I have a datarow, however I must know what ID that row has in the datatable. When I view drTasks array in the Watch window, I can see that there is a rowID property, which is exactly what I need!!! As I understand this rowID value is the ID or the row in the table on which I did the Select(). However, when I write a statement: Dim id As Integer = drTasks(0).rowID then VS warns me that there is no such property as rowID. How can it be so? in the Watch window it is there! Tell me please how to access that rowID property. Thank you, Levon
  • 5. Question about DataTable
    Hi all, I have made a Datatable in my vb code. can i insert those DataTable records into the database directly besides making the sql insert statement? Any tutorial is available for this? Thank you for your help. Regards, Angus

The same table cannot be the child table in two nested relations

Postby Chuck Cobb » Sat, 10 Apr 2004 20:34:20 GMT

I came across an interesting error yesterday.  If you attempt to use ADO.Net
to import an XML file into a DataSet using the DataSet.ReadXML command, you
will receive something similar to the following error:

The same table cannot be the child table in two nested relations.

if there is a field in the table you are importing that has the same name as
the table.  For example, I have a table called "Criteria" that has a field
in it called "Criteria".  I have exported the contents of the table plus
other tables to an XML file.  When I attempt to import the data back into
the dataset, I get an error.  Fortunately, the solution to this was easy...
just change the field name to be something else other than the table name.

Microsoft has acknowledged this to be a bug in the following knowledgebase
article:

 http://www.**--****.com/ ;EN-US;325696

Chuck



Similar Threads:

1.same table cannot be the child table in two nested relations

i get the following error while reading an xml into a dataset
The same table cannot be the child table in two nested relation

is there a solution for it

2.Error Message (Same table, cannot be the the child of two nested relations)

We created a XML Schema that has nested table relations.  We had the
following Warning message come up.

An unhandled exception of the type 'System.ArgumentException' occurred in
system.data.dll

Additional information:  The same Table (DOS_Identifiers) cannot be the
child table in two nested relations.

Does anyone know a workaround for this problem?  You are suppose to be able
to do this according to the standard from W3C.

HELP!
Thanks in advance

-={Brian Kedersha}=-
 XXXX@XXXXX.COM 
 XXXX@XXXXX.COM 


3.The same table 'All' cannot be the child table of two nested relat

Using VS2005 beta 2, I have an xsd provided by a vendor that I want to make 
into a strongly typed data set.  In VS 2003 the MSDataSetGenerator tool gives 
a similar error, which I was told was to be fixed in VS 2005.  And in fact 
the xsd tool does now correctly process the .xsd and create a .vb for it 
which compiles just fine.  But at runtime when I try to new the strongly 
typed data set, I get the above error.  

This schema comes to me from a vendor that has several others that I must 
also work with, and is valid according to XMLSpy and other commercial XML 
tools, and they all have similar structures that re-use elements and thus 
exhibit this behavior.  If VS 2005 can not handle these schemas, I am in big 
trouble, so any suggestions would be greatly appreciated.  

4.The same table 'All' cannot be the child table of two nested r

5.datset with child table in two nested relations

i get the following error while reading an xml into a dataset
The same table cannot be the child table in two nested relation

is there a solution for it

XmlDataDocument datadoc = new XmlDataDocument()
datadoc.LoadXml(xmlstring)
ds = datadoc.DataSet;  

6. The same table (types) cannot be the child table in two nested relations.

7. Two parent tables related to the same Child table

8. convert sql tables with parent-child keys of a nested structure into a nested xml file



Return to dotnet framework

 

Who is online

Users browsing this forum: No registered users and 33 guest