Hi,
I am trying to programmatically add a number of pushpins to a dataset but I am failing.
I am using vb6 and mappoint 2002 and the mappoint active x control.
I get an error which says 'The requested set does not exist'
here is the code i use
'Create a new pushpin set.
mappoint.ActiveMap.DataSets.AddPushpinSet "Suppliers"
'Get the DataSet object from the pushpin set
Set objDs = mappoint.ActiveMap.DataSets("Suppliers")
objDs.Select
'loop through the SQL data...
Do While Not rs.EOF
'Create a location object from the latitude and longitude on the database.
Set objLocTst = mappoint.ActiveMap.GetLocation(rs!Latitude, rs!Longitude)
'Add a pushpin
Set objPin = mappoint.ActiveMap.AddPushpin(objLocTst, rs!Name)
'Make sure the balloon is closed.
objPin.BalloonState = geoDisplayNone
'Put additional data in the note field of the pin.
strNote = rs!AccountNumber & vbCrLf & _
IIf(IsNull(rs!TownCity), "", rs!County & vbCrLf) & _
rs!City & ", " & rs!Country & " " & rs!PostCode & vbCrLf
objPin.Note = strNote
'Cut the pin out of "My Pushpins"...
objPin.Cut
'... and paste into "Locations from DB"
objDs.Paste
'Get the next database record.
rs.MoveNext
Loop
any help is welcome.