MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




ImportData

This is a discussion on ImportData within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I'm trying to importdata from an Access Table. It works fine if I import every records. But, before importing data, ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  5 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 11-16-2006
Junior Member
Yellow Belt
 
Join Date: Aug 2006
Posts: 23
ImportData

I'm trying to importdata from an Access Table.

It works fine if I import every records.

But, before importing data, user has to enter few parameters (date, time, ...)

I'd like to import only records that fits in user's parameters

I've tried with a select in the database, put records into a text file and then importdata with geoDelimiterSemicolon (Set oDS = objMap.DataSets.ImportData(myfilename, , geoCountryCanada, geoDelimiterSemicolon, 1)).

My oDS dataset is always empty.

What's wrong?

Thanks
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 11-16-2006
Senior Member
Blue Belt
 
Join Date: Dec 2002
Posts: 219
Re: ImportData

Lacja,

Did you solve this problem or are you still seeking help?
Are you sure you're exporting using semicolon and not comma?
Can you post a few lines of the text file?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 11-16-2006
Junior Member
Yellow Belt
 
Join Date: Aug 2006
Posts: 23
Re: ImportData

Here it is:

47,6443507242948000 ; -70,1569795701653000
46,8069542571902000 ; -71,2153752241284000
46,8412129394710000 ; -71,2770252116024000
46,8361057620496000 ; -71,2258935067803000
48,5575715638697000 ; -71,6472415532917000
46,8123630993068000 ; -71,2303665094078000
48,4017124213278000 ; -71,1607911810279000
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 11-16-2006
Senior Member
Blue Belt
 
Join Date: Dec 2002
Posts: 219
Re: ImportData

OK. You need an array in the last parameter that indicates
that the first field is geoFieldLatitude and the second geoFieldLongitude.
You need only look up those words for an example.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 11-17-2006
Junior Member
Yellow Belt
 
Join Date: Aug 2006
Posts: 23
Re: ImportData

Hi,

I've alreayd tried:

Dim myfilename As String
Dim myExampleArray(2, 2)

myExampleArray(1, 1) = "Lat"
myExampleArray(1, 2) = geoFieldLatitude
myExampleArray(2, 1) = "Lon"
myExampleArray(2, 2) = geoFieldLongitude

myfilename = "c:\impdata.txt"
...
Set oDS = objMap.DataSets.ImportData(myfilename, myExampleArray, geoCountryCanada, geoDelimiterSemicolon, 1)

oDS always return "nothing"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 11-18-2006
Senior Member
Blue Belt
 
Join Date: Dec 2002
Posts: 219
Re: ImportData

You'd have to make some concessions, but this works for me

Public Function ImportText()
Dim myfilename As String
Dim myExampleArray(1, 1)

myExampleArray(0, 0) = "Latitude"
myExampleArray(0, 1) = geoFieldLatitude
myExampleArray(1, 0) = "Longitude"
myExampleArray(1, 1) = geoFieldLongitude

myfilename = "C:\import.txt"
oMap.DataSets.ImportData myfilename, myExampleArray, , geoDelimiterSemicolon, 0

End Function

Latitude;Longitude
47.6443507242948000 ; -70.1569795701653000
46.8069542571902000 ; -71.2153752241284000
46.8412129394710000 ; -71.2770252116024000
46.8361057620496000 ; -71.2258935067803000
48.5575715638697000 ; -71.6472415532917000
46.8123630993068000 ; -71.2303665094078000
48.4017124213278000 ; -71.1607911810279000
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 11-19-2006
Junior Member
Yellow Belt
 
Join Date: Aug 2006
Posts: 23
Re: ImportData

Hey!

Now it works fine.

It was just my array definition?

Great

Thanks
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

« GPS | Auto Update? »

LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/importdata-5358.html

Posted By For Type Date
Microsoft MapPoint 2006 - MP2K Magazine This thread Refback 11-21-2006 03:03 AM
Extracting MapPoint images with VB.NET - MapPoint News - MP2K Magazine This thread Refback 11-20-2006 12:18 PM
Using MapPoint and Excel for Supply Chain Management - MapPoint Articles - MP2K Magazine This thread Refback 11-19-2006 06:12 PM
What's New in Streets and Trips 2006 - MapPoint Articles - MP2K Magazine This thread Refback 11-19-2006 01:45 AM
Getting Started with the Virtual Earth Map Control - MapPoint Articles - MP2K Magazine This thread Refback 11-18-2006 01:37 PM

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
importdata to shaded areas max677 MapPoint 2006/2009 Discussion 5 10-14-2006 03:08 PM
ImportData method ? mgorgone MapPoint 2006/2009 Discussion 2 06-02-2005 01:31 PM
c# ImportData method help needed fletch MapPoint 2006/2009 Discussion 8 03-09-2005 09:15 AM
ImportData Anonymous MapPoint 2006/2009 Discussion 0 11-04-2004 03:05 AM
Implementing ImportData in C/C++ moojit MapPoint 2006/2009 Discussion 0 09-01-2002 10:58 PM


All times are GMT -5. The time now is 01:11 AM.


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

Cheap Flights Turkey
Cheap flights to Turkey are a reality when you book online with Holiday Hypermarket. Discover Turkish delights with Turkish cheap flights.

Portugal Weather
Check Portugal Weather before you travel. We provide information on Portugal including weather, flights and accommodation.

Holiday Jamaica
What springs to mind when you hear the word Jamaica? Bob Marley and Rum? Think again. Book a low cost holiday in Jamaica to explore this island for yourself.

St Lucia Holidays
St Lucia holidays offer something for everyone. Enjoyed by families and young couples alike, St Lucia is a great destination. See online!

Morocco
Gain insight on your holiday destination with the ULookUBook travel guides. Find out about Morocco and its customs online. Make an informed decision when you make a booking.

Compare holiday prices
Compare holiday prices online where you can see all the possibilities at Travel.co.uk

Cheap Holidays to Gran Canaria
Book a flight to the Canary Islands! View information on cheap holidays to Gran Canaria online at On The Beach.


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