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 5 of 5

Export Territories

This is a discussion on Export Territories within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi all, I Have the mappoint control in my vb.net application and i import on the fly territories. When I ...

  1. #1
    Rubinho is offline Junior Member White Belt
    Join Date
    Nov 2006
    Posts
    10

    Question Export Territories

    Hi all,

    I Have the mappoint control in my vb.net application and i import on the fly
    territories.
    When I press F6, the territory manager appears and i can add/remove areas to
    a territory

    Now i want to export these territories (for updating my database).
    I can do this with the code at the bottom of this message.
    The problem i have is that it only works before i change something.
    When i change something te fields in the recordset are empty.

    Does somebody has a solution ?
    I would very appreciate it.

    ********************************
    For Each ds As MapPoint.DataSet In mp.ActiveMap.DataSets
    If ds.DataMapType =
    MapPoint.GeoDataMapType.geoDataMapTypeTerritory Then
    Dim rset As MapPoint.Recordset
    Dim results As String = ""
    If ds.RecordCount > 0 Then
    rset = ds.QueryAllRecords
    rset.MoveFirst()
    Do While Not rset.EOF
    For Each fld As MapPoint.Field In rset.Fields
    results += fld.Value.ToString() + " "
    Next
    results += vbCrLf
    rset.MoveNext()
    Loop
    MsgBox(results)
    End If
    End If
    Next
    ********************************

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

    Re: Export Territories

    Hi,

    Can you tell us what exacly you change to get the fields empty ?

  3. #3
    Rubinho is offline Junior Member White Belt
    Join Date
    Nov 2006
    Posts
    10

    Re: Export Territories

    Quote Originally Posted by Wilfried View Post
    Hi,

    Can you tell us what exacly you change to get the fields empty ?

    The only thing I change is a territory. For example, Bill has a territory set to Paris and i add some cities around Paris into the territory

    From that point, the recordset from the map dataset has lost his fields, so i cant loop anymore in it.
    I can loop in the records of the recordset but not anymore in de fields of the recordset. Recordset.fieldcount = 0

    Maybe there is someway to refresh the dataset ??
    I really don't know

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

    Re: Export Territories

    Hi,

    Possible the changes destroy the previous import. Maybe a workaround is to do it all programatically?

  5. #5
    Rubinho is offline Junior Member White Belt
    Join Date
    Nov 2006
    Posts
    10

    Angry Re: Export Territories

    Quote Originally Posted by Wilfried View Post
    Hi,

    Possible the changes destroy the previous import. Maybe a workaround is to do it all programatically?
    Well i'm looking for a workoaround for it. I tried to update my linked data source (txt file), but that doesn't work also.

    Does somebody now another way to export my territory updates ?
    If I have one, it's oke, then i'll program it that way

    thx

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Export to shapefile
    By davide_mappoint in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 10-28-2005, 11:03 AM
  2. Territories creating city territories
    By cableghost in forum MapPoint Desktop Discussion
    Replies: 8
    Last Post: 08-30-2005, 04:47 PM
  3. how to add postal code to territories for an excel export ?
    By nat in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 05-25-2005, 07:23 AM
  4. How can I export POI data?
    By Wavshrdr in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 10-27-2004, 03:45 PM
  5. Export map to gif
    By pd1 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-19-2003, 02:36 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