Community of VE/MapPoint Users and Developers
This is a discussion on Getting "unspecified error" in VB during FindAddre within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I have a VB app that accesses the current Map object, and uses the following code... Set oFR = oMap.FindAddressResults(Address1, ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Getting "unspecified error" in VB during FindAddre Set oFR = oMap.FindAddressResults(Address1, City, ,ST, Zip, geoCountryUnitedStates) followed by If oFR.ResultsQuality < geoNoGoodResult Then... if Address1 includes the string "po box" then I get a VB application error (0x80004005) 'Unspecified error" I would have thought that if the FindAddressResults() fails, it would set oFR to nothing, OR the ResultsQuality would be geoNoGoodResult or higher. Unforunately, I'm never able to get this far. Any ideas? TIA, Mike
__________________ Mike Schoonmaker |
| |||
| PO box
I ran into the same problem. In the MP reference there are some guidelines. I had to add a filter to remove these items. I still think it is pretty bad that an unhandled exception is thrown. Here are the rules: Address coverage in MapPoint is available for all of the United States and major urban areas in Canada. Type as much of the address as possible. Adding the ZIP or postal code is especially helpful. Do not include apartment, suite, post office (P.O.) box numbers, or rural route (R.R.) addresses in the street address. Do not include fractions. For example, if the address is 654 1/2 Carlson Street, type 654 Carlson Street. If you are not sure of the correct spelling of a street or city name, type the closest approximation you can to view a list of possible choices, and then click the best match in the list. If a street name includes an ampersand (&), replace the ampersand with the word "and." (Ampersands are used to denote intersections.) If you cannot find an address that includes an abbreviation, try spelling it out. For example, try Saint James if "St. James" is not recognized. |
| |||
| RE: Getting "unspecified error" in VB during FindA
The address being used should not be a problem. I'm running the addresses through some USPS CASS-certified software for Address Correction before running in MapPoint. Thanks for your suggestions.
__________________ Mike Schoonmaker |
| ||||
| "Unspecified Error" - problem solved
I just thought I'd post my solution to the "unspecified error" issue. I ended up setting the oName object to null at the end of the method and the symptoms went away. I didn't realize the object was being passed into Map Point itself; I'd incorectly assumed that they would be deallocated when the method completed and the object passed out of scope. Cheers, Andre Ranieri |
| ||||
| Unspecified Error - MapPoint 2006 Active-X from VS .NET 2003
A followup to my earlier post: It appears the unspecified error is some type of memory leak / buffer overflow coming from MapPoint itself. The users can query so many recordsets from the map's pushping sets before MapPoint bombs. Apprently, when the axMapPoint map object is dumped to a .ptm file (.saveas method) the buffers are cleared. I'll never know how I stumbled upon this. My really, really ugly workaround to the issue is to save the map to a file every time the pushpin selection changes on the map. Occasionally the file has an exclusive lock on it after being saved, which is only released when MapPoint is closed. This is the reason for the try / empty catch block and random number concatenated into the file name. The dispose method of the form attempts to delete the temp directory. Again, this is ugly but appears to solve the unspecified error bug. Andre Ranieri string sRnd = rGen.Next(1,1000).ToString(); //create temp directory to "dump" mappoint maps if(!Directory.Exists(@"C:\Temp\" + Class1.sLogin + @"\MapPoint\")) { Directory.CreateDirectory(@"C:\Temp\" + Class1.sLogin + @"\MapPoint\"); } try { this.axMapPoint.SaveMapAs(@"C:\Temp\" + Class1.sLogin + @"\MapPoint\BestFit" + sRnd+ ".ptm"); } catch { } oMap.Saved = true; |
![]() |
| Tags |
| findaddre, unspecified error |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error in calling "get_streetAddress" | dgaranz | MapPoint 2006/2009 Discussion | 5 | 06-23-2006 06:03 AM |
| 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 |