View Full Version : ImportData method doesn't function
I use Mappoint within VB.
I try to import a text file with the metod ImportData, but I get an error saying: "Enable to connect to the DataSourceMoniker specified"
My call is:
Set oDS = oMap.DataSets.importData(filename, , geoCountryDefault, geoDelimiterDefault, 0)
My text file is an ordinary text file with tabulation like separator.
Could you help me please ?
12-27-2002, 11:40 AM
If your file has a TAB delimiter you two choices. If you specify geoDelimiterDefault then your filename has to have an ".asc" extention.
Or insted of geoDelimiterDefault use geoDelimiterTab.
Also, the last parameter is ImportFlags which you have a 0. That would mean the first row of the file contains field names, which is the default. If that is not the case, change it to 1.
12-01-2003, 07:31 AM
I am importing a tab delimited file that has a ".GPS" extension. I have tried geoDelimiterTab and geoDelimiterDefault but the import still fails "Cannot connect with the specified DataSourceMoniker."
Changing the name of the file to have a ".TXT" extension allows the import to succeed. Unfortunately, the naming convention is out of my hands and I do not want to make a copy of the file.
Are there any other options?
12-01-2003, 10:27 AM
Creating a temp file from the .gps file might be the way to go? I don't see anything that says it must be named .txt but you kinda proved it?
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO