Community of VE/MapPoint Users and Developers
This is a discussion on Error in calling "get_streetAddress" within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, May somebody help me? I'm making a program in Delphi6 and MapPoint2004 and I used exactly the example in ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Error in calling "get_streetAddress" May somebody help me? I'm making a program in Delphi6 and MapPoint2004 and I used exactly the example in the code found at http://www.mp2kmag.com/a80--delphi.a....mappoint.html. function TFMain.Controll_Address(address:string):string; 02 var 03 ret:string; 04 r:FindResults; 05 o:OleVariant; 06 item:location; 07 line, street,city1,city2,region,postalcode:string; 08 country:Olevariant; 09 begin 10 line:=address; 11 ...... .... r:=Mapp.ActiveMap.FindAddressResults(street,city1, city2, region, postalcode, country); 20 21 22 23 if r.Count>0 then 24 begin 25 o:=1; 26 item:=r.get_item(o) as location; 27 ret:= 28 item.Get_StreetAddress.Get_Street+','+ ...... WHEN I call the function Get_streetAddress.Get_street or get_city I have a "Access violation at address 0045FE5C. Read of address 000000. Thanks |
| ||||
|
Do you know which line the Access Violation occurs on? I don't know Delphi but do know some Pascal. It was pre-COM, so I may only be able to provide limited help. (eg. I don't know how Delphi handles COM objects - releasing them,etc) Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools See the Geoweb Guru for online mapping |
| |||
| Re: Error in calling "get_streetAddress"
Hi, Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi Richard, Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| ||||
|
If the rror is at the last line, it might be because the list of locations probably includes some location objects which do not have their streets setting. Location have a number of different properties and they are not necessarily all set! Eg. if the Location object represents a country (and only a country) then none of the other proeprties will be set. Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools See the Geoweb Guru for online mapping |
| |||
|
Hi Richard, Yes you are right. He must something do as: Code: if Item <> nil then Item.CallMethod; Code: if Assigned(Item) then Item.CallMethod;
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| calling, error, getstreetaddress |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting "unspecified error" in VB during FindAddre | mschoonmaker | MapPoint 2006/2009 Discussion | 5 | 06-12-2006 02:11 PM |
| MapPoint OLE error: "Could not update object" | wiecho_k | MapPoint 2006/2009 Discussion | 1 | 07-23-2005 11:53 AM |
| Error "overflow execution stack" while readinq a | Anonymous | MapPoint 2006/2009 Discussion | 5 | 02-18-2005 02:47 PM |
| Do I need "Autoroute Europe", if I install "M | bigtail | MapPoint 2006/2009 Discussion | 1 | 03-24-2004 12:58 AM |
| error 16398 with NT service "localsystem" | arsenic77 | MapPoint 2006/2009 Discussion | 3 | 06-19-2003 11:37 AM |