MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




MP 2004 + VS2005 COM exception

This is a discussion on MP 2004 + VS2005 COM exception within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I was trying to get some examples from the MapPoint book to work but when i try to add ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-27-2006
Junior Member
White Belt
 
Join Date: Nov 2005
Posts: 3
MP 2004 + VS2005 COM exception

Hi, I was trying to get some examples from the MapPoint book to work but when i try to add a pushpin i get a COM exception.

Code:
//Get map center location
MapPoint.Location location = axMappointControl1.ActiveMap.Location;
//Add a pushpin at this location
MapPoint.Pushpin pushpin = axMappointControl1.ActiveMap.AddPushpin(location, "Center");
//Assign a symbol
pushpin.Symbol = 64;
//Select and highlight the location
pushpin.Select();
pushpin.Highlight = true;
//Write annotation
pushpin.Note = "This is my favorite place!";
Either in Csharp and VB.net i get this error at axMappointControl1.ActiveMap.AddPushpin:
The database schema is not recognized

Can someone help me please ?

Thanks in advance!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Hi,

You need to assigne the location first from coordinates:

Code:
 Location loc = mp.ActiveMap.GetLocation(lat, lon, alt);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
2004, exception, vs2005


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Unknown Host Exception amitsh MapPoint 2006/2009 Discussion 3 12-19-2008 12:39 AM
ActiveX control fails in VS2005, but was fine in VS2003 jtowell MapPoint 2006/2009 Discussion 7 11-23-2006 02:42 PM
OutOfMemory Exception Gianmaria MapPoint 2006/2009 Discussion 1 01-24-2006 12:26 PM
Regarding COM exception at the end of execution... Anonymous MP2K Magazine Articles 0 05-12-2005 12:23 PM
Recordset exception. What am I doing wrong? Anonymous MapPoint 2006/2009 Discussion 3 01-25-2005 02:26 PM


All times are GMT -5. The time now is 12:17 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Dalaman Holiday
Enjoy a wonderfully peaceful Dalaman holiday... Book through UlookUbook and save!



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59