Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

MP 2004 + VS2005 COM exception

This is a discussion on MP 2004 + VS2005 COM exception within the MapPoint Desktop 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 ...

  1. #1
    NoDed is offline 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!

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    You need to assigne the location first from coordinates:

    Code:
     Location loc = mp.ActiveMap.GetLocation(lat, lon, alt);

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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