Hi, I'm using mappoint (Europe, in spanish) from VB 6, trying the following code:
mp1 is a mappoint control in the form
I'm looping through the waypoints and saving them in a table. Later, I read those names and create a route in the map, with this code:Code:For l = 1 To mp1.ActiveMap.ActiveRoute.Waypoints.Count g_dbPalmera.Execute "insert into Ped_Rutas(pru_Lugar,pru_Numero) values('" & _ LegalizarComillas(mp1.ActiveMap.ActiveRoute.Waypoints.Item(l).Name) & "'," & SomeNumber & ")" Next l
The problem is: The user enters a place in the route planner, for example "Le Havre", and finds "Le Havre, Alta Normandía, Francia". Now he adds it to the route, and in the route it looks "El Havre", which is what the first loop above reads in mp1.ActiveMap.ActiveRoute.Waypoints.Item(l).Name and saves to the database. When the second loop above reads the database, mp1.ActiveMap.FindPlaceResults("El Havre").Item(1) can't find the place the user entered the first time. It finds "El Haméré" instead.Code:mp1.ActiveMap.ActiveRoute.Clear If Not (m_rsLineasRuta.EOF And m_rsLineasRuta.BOF) Then m_rsLineasRuta.MoveFirst While Not m_rsLineasRuta.EOF mp1.ActiveMap.ActiveRoute.Waypoints.Add mp1.ActiveMap.FindPlaceResults(m_rsLineasRuta("pru_Lugar")).Item(1) m_rsLineasRuta.MoveNext Wend m_rsLineasRuta.MoveFirst mp1.PaneState = geoPaneRoutePlanner End If
Can anyone please tell me what am I doing wrong?
Thanks in advance.