MapPoint Forums

MapForums

Community of VE/MapPoint 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

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,112
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
ActiveX control fails in VS2005, but was fine in VS2003 jtowell MapPoint 2006/2009 Discussion 7 11-23-2006 03:42 PM
OutOfMemory Exception Gianmaria MapPoint 2006/2009 Discussion 1 01-24-2006 01:26 PM
Regarding COM exception at the end of execution... Anonymous MP2K Magazine Articles 0 05-12-2005 01:23 PM
Recordset exception. What am I doing wrong? Anonymous MapPoint 2006/2009 Discussion 3 01-25-2005 03:26 PM
Unknown Host Exception amitsh MapPoint 2006/2009 Discussion 2 11-04-2004 12:18 AM


All times are GMT -5. The time now is 05:48 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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