Yazzy
08-16-2005, 06:02 PM
how can you create new dataset from an existing one?
Thanks in advance
:(
Thanks in advance
:(
Creating New DatasetYazzy 08-16-2005, 06:02 PM how can you create new dataset from an existing one? Thanks in advance :( Wilfried 08-17-2005, 03:07 PM Hi, MapPoint.DataSet newSet= MP.ActiveMap.DataSets.AddPushpinSet("new set"); rs.MoveFirst(); while (!rs.EOF) { rs.Pushpin.MoveTo(newSet); rs.MoveNext(); } Yazzy 08-22-2005, 04:54 AM Hi, I am getting an error 'Object does not support this property or method' when I try to creat a new dataset. I am using DisplayDataMap to import data. Where am I going wrong? Dim objmap As MapPointCtl.Map Dim objLoc As MapPointCtl.location Dim objpushpin As MapPointCtl.Pushpin Dim objdataset As MapPointCtl.DataSet Dim objRS As MapPointCtl.Recordset Dim objPin As MapPoint.Pushpin Dim objSymbol As MapPoint.Symbol Dim objPsymbol As MapPointCtl.Symbol Dim objRS1 As MapPointCtl.Recordset Dim objRS2 As MapPointCtl.Recordset Dim set1 As MapPoint.DataSet '//////////////////////////////////////////////////////////////////////////// Set objdataset = objmap.DataSets(1) Set objRS = objdataset.QueryAllRecords '??? Set objRS1 = objRS Set objRS2 = objRS Set set1 = objmap.DataSets.AddPushpinSet("Test") Do While Not objRS2.EOF location = objRS.Fields(1) Set objLoc = objmap.FindResults(location).Item(1) 'Works Set objPin = objmap.FindPushpin(objRS2.Fields(3)) Set objPin = objmap.AddPushpin(objLoc) objPin.MoveTo (set1) 'THIS IS WHERE I GET THE ERROR 'Object does not support this method or propertry' I will be very grateful if you are to help. Thanks in advance Wilfried 08-23-2005, 03:58 AM Hi, I never used DisplayDatamap. Maybe the problem is in there ? Try first something simple and see if this works like this example: Map map = MP.ActiveMap; Location loc = map.GetLocation(50, 4, 1); Pushpin pp = map.AddPushpin(loc, "Wilfried"); MapPoint.DataSet newSet = map.DataSets.AddPushpinSet("New set"); pp.MoveTo(newSet); Is in C# but you can easely convert it to VB and try it. Mohamed 08-23-2005, 07:20 AM Hi, objPin.MoveTo (set1) 'THIS IS WHERE I GET THE ERROR 'Object does not support this method or propertry' Try this and replace the line where you have the error: objPin.MoveTo objmap.DataSets.Item("Test") I didn't the test, but I think this should be working! I hope. Bye | ||