Data relation, is it possible?

Topics: SharpMap v0.9 / v1.x
Apr 4, 2011 at 4:21 AM

Is the data relation model allowed with the FeatureDataSet?, I'm getting this error "Cannot create a DataRelation if Parent or Child Columns are not in a DataSet"


// Feature Data Set
FeatureDataSet DS = new FeatureDataSet(); // Load tables SharpMap.Data.Providers.ShapeFile SHP1 = new SharpMap.Data.Providers.ShapeFile(@"Resources\test.shp"); SHP1.Open(); SHP1.ExecuteIntersectionQuery(SHP1 .GetExtents(), DS); SharpMap.Data.Providers.ShapeFile SHP2 = new SharpMap.Data.Providers.ShapeFile(@"Resources\test.shp"); SHP2.Open(); SHP2.ExecuteIntersectionQuery(SHP2 .GetExtents(), DS); // Add relation DS.Relations.Add("",DS.Tables[0].Columns[0], DS.Tables[1].Columns[0],false);