when u use the follow code on 1.1.it will compile without error.
/**////<summary>
///Testtablerelation.
///</summary>publicvoidRelation_1_1()
...{
DataTabledtParent=this.CreateDataTable();
dtParent.TableName="Parent";
DataRelationrelations=ds.Relations.Add("Relation",dtParent.Columns["index"],dtParent.Columns["parent_index"],false);
this.builder.Append(" GetthedatafromtreeROOT.");
this.GetLayerFromParent(ds,relations);
this.PrintDataTable(ds.Tables["parent"]);
this.builder.Append(" GetthedatafromtreeCHILDS.");
this.GetLayerFromChilds(ds,relations);
this.PrintDataTable(ds.Tables["parent"]);
this.DebugPrint(this.builder.ToString());
}
while it will run error on 2.0 with "Cannot create a DataRelation if Parent or Child Columns are not in a DataSet.".
if u want to run normally,u can use this cod:
/**////<summary>
///Testtablerelation.
///</summary>publicvoidRelation_2_0()
...{
DataTabledtParent=this.CreateDataTable();
dtParent.TableName="Parent";
DataSetds=newDataSet();
ds.Tables.Add(dtParent);
DataRelationrelations=ds.Relations.Add("Relation",ds.Tables["Parent"].Columns["index"],ds.Tables["Parent"].Columns["parent_index"],false);
this.builder.Append(" GetthedatafromtreeROOT.");
this.GetLayerFromParent(ds,relations);
this.PrintDataTable(ds.Tables["parent"]);
this.builder.Append(" GetthedatafromtreeCHILDS.");
this.GetLayerFromChilds(ds,relations);
this.PrintDataTable(ds.Tables["parent"]);
this.DebugPrint(this.builder.ToString());
//this.WriteToTxtFile(this.builder.ToString());
}
what's your idea?
分享到:
相关推荐
The Differences of Chinese and English中英文写作差异
The Differences Between Chinese and American Cultures from the Perspective of Politeness Utterances.zip
What are the differences between least-squares and Kalman filtering
however, there are some significant differences between the capabilities of Silverlight and WPF, as well as important differences in the programming features of the two technologies. There are ...
The differences in perception of the role of marketing innovation and creativity in achieving a competitive edge for commercial banks between the bank’s staff and client’s,Tareq Quporsi,Fadi ...
Differences between C++ and C# 可以看看。
英语和汉语的区别
Before, the differences between target platforms was a major roadblock, but that's not the case now. .NET Core 2.0 By Example will take you on an exciting journey to building better software. This ...
Cultural Differences in Diets Between China and the West.zip
Talk Show Differences Between China and America from the Perspective of the Form and Express.zip
Differences between EEWB and BDT
This new edition includes the differences between the Cortex-M0 and Cortex-M0+ processors such as architectural features (e.g. unprivileged execution level, vector table relocation), new chapters on ...
The section about Egyptian and Babylonian science starts with the differences in their types of arithmetic. Lindberg states that the Babylonian notation is superior because of its greater parsimony. ...
图像处理-图片找不同Find the differences of the two images #Matlab下调用Python接口#SIFT算法应用 博客链接: https://blog.csdn.net/qq_34243930/article/details/85316240
The capability to accurately detect changes between successive versions of the IFC representation of a BIM model would enable the development of generic change management functionalities for ...
Allstate Insurance Company, Property & Casualty "The Psychology of Money represents a major step toward development of a portfolio theory that recognizes human dynamics and differences among people....
state 50 differences between marketing and sales
COBIT 2019 Major Differences with COBIT 5-v1.1.pdf
The x86 Instruction Set 3.3.6 - Addressing Modes on the x86 3.3.7 - Encoding x86 Instructions 3.3.8 - Step-by-Step Instruction Execution 3.3.9 - The Differences Between the x86 Processors...
the differences between a full OpenGL renderer and the OpenGL ES renderer. This document is defined relative to the OpenGL 2.0 specification. This document specifies the OpenGL ES renderer. A ...