Community of VE/MapPoint Users and Developers
This is a discussion on Importing address with an array of fields specified within the MapPoint 2006/2009 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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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 |
| |||
| Here is how it should have been coded 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 |
![]() |
| Tags |
| address, array, fields, importing |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Populating pushpin fields. | Anonymous | MapPoint 2006/2009 Discussion | 3 | 08-13-2004 05:08 PM |
| pushpins and fields | techecho | MapPoint 2006/2009 Discussion | 1 | 05-24-2004 02:28 PM |
| array of locations | Bart Vervenne | MapPoint 2006/2009 Discussion | 3 | 04-14-2003 05:03 AM |
| I want to import data. I want to show four fields..... | Anonymous | MapPoint 2006/2009 Discussion | 2 | 06-17-2002 09:09 AM |
| How do I export lat/long fields from Mappoint to E.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 09-29-2001 10:57 PM |