MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Importing address with an array of fields specified

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-05-2003
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 12-30-2003
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
address, array, fields, importing


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 03:34 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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