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

i want to use this example but it don't work

This is a discussion on i want to use this example but it don't work within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, I use Mappointcontrol and visual basic 6. I want to use this code but when i execute my program ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    i want to use this example but it don't work

    Hello,
    I use Mappointcontrol and visual basic 6.
    I want to use this code but when i execute my program it tell : "Erreur d'execution : -2147024809" on the line "Set mpDataSet = mpDatasets.ImportData......"
    Can someone help me ??
    Sorry for my bad english but i'm french

    My excel file structure is :

    A1:Latitude A2:4852
    B1:Longitude B2:220
    C1:City C2:Paris

    My code is :

    Dim mpApp As MapPoint.Application
    Dim mpDatasets As MapPoint.DataSets
    Dim mpDataSet As MapPoint.DataSet
    Dim myExampleArray(3, 2)

    'Start MapPoint
    Set mpApp = New MapPoint.Application
    mpApp.Visible = True
    mpApp.UserControl = True

    'Get the DataSets collection
    Set mpDatasets = mpApp.NewMap.DataSets

    'Create the ArrayOfFields descriptions

    'Field is specified by name
    myExampleArray(1, 1) = "Latitude"
    'tells MapPoint to use this field as the latitude field
    myExampleArray(1, 2) = geoFieldLatitude

    'Field again specifed by name
    myExampleArray(2, 1) = "Longitude"
    'tells MapPoint to use this field as the longitude field
    myExampleArray(2, 2) = geoFieldLongitude

    'Field is listed by index, rather than name
    myExampleArray(3, 1) = 1
    'tells MapPoint to use this field as additional (non geocoding) information
    myExampleArray(3, 2) = geoFieldData



    'Perform the import
    Set mpDataSet = mpDatasets.ImportData("c:\foo.xls!Feuil1!A1:B3", myExampleArray)

    'The (x,2) elements are of the type GeoFieldType or string.
    'If string, then they set the new name of the field, and
    'MapPoint assumes that the field is a nongeocoding data field.

  2. #2
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    Stephane, well your English beats my French and I sat through yers of it at school!

    Have you tried putting the longitudes and latitudes as decimal angles?

    eg. Latitude = 48 + (52 / 60) = 48.866667

    (the 52 being minutes of arc, so divide by 60)

    MapPoint seems to work in decimal angles rather arc-minutes and arc-seconds.

    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    yes i 've tried but it doesn't seem to work.....

  4. #4
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Salut Stephane,
    Tu as suivi l'exemple de l'aide de MapPoint.
    Erreur dans la definition du tableau:

    Dim myExampleArray(1 to 3, 1 to 2)

    Ou alors modifie tes indices partir de 0

    Bon courage,
    PP

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Work with mapinfo by VB6, help me!!!
    By Anonymous in forum Other Mapping Platforms
    Replies: 8
    Last Post: 05-31-2011, 07:59 AM
  2. Will MapPoint Work for Me
    By budzinsk in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 06-07-2005, 06:47 PM
  3. .Net frame work ??
    By pratap in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 01-21-2005, 05:09 AM
  4. does mappoint2002 work with win 95
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 06-24-2003, 07:45 AM
  5. UDL to SQLServer doesn't work (C#)
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-03-2003, 05:50 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