SV: [MI-L] Problem Creating Points

54 views
Skip to first unread message

Peter Horsbøll Møller

unread,
May 23, 2013, 3:31:59 PM5/23/13
to mapi...@googlegroups.com
Tour sTable refers to a fule name as well as a table name.
I would recommend you use sFile for the file and them use
sTable = PathToTableName$(sFile)
To get the table name from the file name.

Now you have two variables both String. sFile refers to the file as you see it in Windows Explorer and sTable is the table name as MI Pro expects it

Peter Horsbøll Møller

Fra: Allan
Sendt: ‎23-‎05-‎2013 16:08
Til: mapi...@googlegroups.com
Emne: [MI-L] Problem Creating Points

Here's my problem, I'm trying to convert a series of .csv files in .tab using this code:

sTable = FileOpenDlg("","","csv","Open CSV")
Register Table sTable TYPE ASCII Delimiter 44 Titles Charset "WindowsLatin1" Into sTable
Open Table sTable Interactive
Create Map For sTable CoordSys Earth Projection 1, 0
Update sTable Set Obj = CreatePoint(Longitude, Latitude)
Commit Table sTable Interactive
Map From sTable

The "sTable" is a Global variable.

typing each line of the code in the MapBasic inside the MapInfo works fine, but when I use the program I got this error:

"Expression does not evaluate to a column or table name"

What am I doing wrong?

Thanks in advance.

--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
 
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Allan

unread,
May 23, 2013, 4:15:05 PM5/23/13
to mapi...@googlegroups.com
Genius, it worked Peter
Thanks for the Help
Reply all
Reply to author
Forward
0 new messages