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

Importing address with an array of fields specified

This is a discussion on Importing address with an array of fields specified within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am importing a list of addresses from SQL UDL. For some reason the import defaults the name of the ...

  1. #1
    jscott099 is offline Junior Member White Belt
    Join Date
    Oct 2003
    Posts
    8

    Importing address with an array of fields specified


    I am importing a list of addresses from SQL UDL. For some reason the import defaults the name of the pushpin balloon to Address2 if it is not Null, otherwise it defaults to Address1. I really want it to be a user field called "Tech_ID". I tried to create an array of fields specification (see the attached code) but always get the infamous 'The Parameter is Incorrect' . I'm guessing I have something spec'd wrong on the array. Anyone give a hand on this?

    Dim TechFieldArray(,) As MapPoint.GeoFieldType
    TechFieldArray = New MapPoint.GeoFieldType(8, 2) {}
    'TechFieldArray(1, 1) = "Tech_ID"
    TechFieldArray(1, 1) = 1
    TechFieldArray(1, 2) = MapPoint.GeoFieldType.geoFieldName
    'TechFieldArray(2, 1) = "Current_Site"
    TechFieldArray(2, 1) = 2
    TechFieldArray(2, 2) = MapPoint.GeoFieldType.geoFieldData
    'TechFieldArray(3, 1) = "Address1"
    TechFieldArray(3, 1) = 3
    TechFieldArray(3, 2) = MapPoint.GeoFieldType.geoFieldAddress1
    'TechFieldArray(4, 1) = "Address2"
    TechFieldArray(4, 1) = 4
    TechFieldArray(4, 2) = MapPoint.GeoFieldType.geoFieldAddress2
    'TechFieldArray(5, 1) = "City"
    TechFieldArray(5, 1) = 5
    TechFieldArray(5, 2) = MapPoint.GeoFieldType.geoFieldCity
    'TechFieldArray(6, 1) = "State"
    TechFieldArray(6, 1) = 6
    TechFieldArray(6, 2) = MapPoint.GeoFieldType.geoFieldRegion1
    'TechFieldArray(7, 1) = "ZIP"
    TechFieldArray(7, 1) = 7
    TechFieldArray(7, 2) = MapPoint.GeoFieldType.geoFieldPostal1
    'TechFieldArray(8, 1) = "Country"
    TechFieldArray(8, 1) = 8
    TechFieldArray(8, 2) = MapPoint.GeoFieldType.geoFieldCountry

    ' Import the Tech Site Addresses Query view, using the TechField Array to map the fields to
    ' Mappoint dataset import geo field codes
    oDataSetTechs = oMap.DataSets.ImportData("C:\UDL\Data_WorkbenchSQL .UDL!Tech_Site_Addresses Query", TechFieldArray)
    Jesse Scott
    Varicom, Inc.
    Service Management Optimization Dispatching Solutions

  2. #2
    jscott099 is offline Junior Member White Belt
    Join Date
    Oct 2003
    Posts
    8

    Here is how it should have been coded

    Dim JobFieldArray(,) As Object
    ReDim JobFieldArray(6, 1)
    JobFieldArray(0, 0) = "Job_ID"
    JobFieldArray(0, 1) = MapPoint.GeoFieldType.geoFieldName
    JobFieldArray(1, 0) = "Address1"
    JobFieldArray(1, 1) = MapPoint.GeoFieldType.geoFieldAddress1
    JobFieldArray(2, 0) = "Address2"
    JobFieldArray(2, 1) = MapPoint.GeoFieldType.geoFieldAddress2
    JobFieldArray(3, 0) = "City"
    JobFieldArray(3, 1) = MapPoint.GeoFieldType.geoFieldCity
    JobFieldArray(4, 0) = "State"
    JobFieldArray(4, 1) = MapPoint.GeoFieldType.geoFieldRegion1
    JobFieldArray(5, 0) = "ZIP"
    JobFieldArray(5, 1) = MapPoint.GeoFieldType.geoFieldPostal1
    JobFieldArray(6, 0) = "Country"
    JobFieldArray(6, 1) = MapPoint.GeoFieldType.geoFieldCountry

    ' The next statement performs a Mappoint Import Data from the SQL table
    oDataSetJobs = oMap.DataSets.ImportData("C:\JHS Varicom\DA Conversion\RDA_Data_WorkbenchSQL.UDL!Job_Cust_SLA_ Address_View", _
    JobFieldArray, MapPoint.GeoCountry.geoCountryUnitedStates, MapPoint.GeoDelimiter.geoDelimiterDefault)
    Jesse Scott
    Varicom, Inc.
    Service Management Optimization Dispatching Solutions

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Populating pushpin fields.
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 08-13-2004, 05:08 PM
  2. pushpins and fields
    By techecho in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-24-2004, 02:28 PM
  3. array of locations
    By Bart Vervenne in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 04-14-2003, 05:03 AM
  4. I want to import data. I want to show four fields.....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 06-17-2002, 09:09 AM
  5. How do I export lat/long fields from Mappoint to E....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-29-2001, 10:57 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 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