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

Visual Studio 2005 Dataset and Mappoint 2006

This is a discussion on Visual Studio 2005 Dataset and Mappoint 2006 within the Development forums, part of the MapPoint Desktop Discussion category; I'm pulling my hair out. I've been pouring over forums for a couple of days, tried using the msdn information, ...

  1. #1
    Ben.Casey is offline Junior Member White Belt
    Join Date
    Sep 2009
    Location
    Dallas
    Posts
    2

    Visual Studio 2005 Dataset and Mappoint 2006

    I'm pulling my hair out. I've been pouring over forums for a couple of days, tried using the msdn information, but i can't figure this out. I see a lot of code examples for C, but i use VB.

    Can someone please post VB code example that will take an existing visual studio dataset/tableadapter with name, address, city, state, zip fields and use it to add pushpins to an embedded map (axmappointcontrol). I see plenty of code on how to import from access, excel, csv, etc... shouldn't i be able to pull data from a dataset from within the app i'm writing?

    Thanks in advance for any help.

  2. #2
    Ben.Casey is offline Junior Member White Belt
    Join Date
    Sep 2009
    Location
    Dallas
    Posts
    2

    Re: Visual Studio 2005 Dataset and Mappoint 2006

    OK,

    I've figured out a quick and dirty method that seems to be working.
    I had to place a datagridview in the form.

    Here's the code.

    Dim objMap As MapPoint.Map
    AxMappointControl1.NewMap(MapPoint.GeoMapRegion.ge oMapNorthAmerica)

    ForEach dv As DataGridViewRow In mydgvDataGridView.Rows
    Dim oLoc As MapPoint.Location
    Dim objPP As MapPoint.Pushpin

    objMap = AxMappointControl1.ActiveMap
    oLoc = objMap.PP(dv.Cells(6).Value.ToString)(1)
    objPP = objMap.AddPushpin(oLoc, dv.Cells(3).Value.ToString)
    Next dv
    Last edited by Ben.Casey; 09-10-2009 at 04:33 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Visual Studio 08 & MapPoint
    By Mr.Addy in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 11-20-2008, 02:12 PM
  2. Mappoint with visual studio .net
    By sandy336 in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 10-08-2008, 07:44 AM
  3. Map Point Location Server WSDL Errors in Visual Studio 2005
    By insanek in forum Bing Maps and MapPoint Web Service
    Replies: 0
    Last Post: 03-01-2007, 04:52 PM
  4. MapPoint 2004 and Visual Studio 2005 Runtime error
    By tizer001 in forum MapPoint Desktop Discussion
    Replies: 10
    Last Post: 02-26-2006, 10:51 AM

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 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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127