After wasting some hours on an issue with mapBasic/ Mapinfo Version 10.0
last night, now using MapBasic 10.5 is giving me grief.
It seems that compiling a program in 10.5 doesn’t like create table commands
that include the clause “using”:
This compiles:
Create Table "TMP_YearFarm_Combined" (ID Integer)
file gAgDatWorkingPath + "TMP_YearFarm_Combined.TAB" TYPE
NATIVE
But this doesn’t:
Create Table "TMP_YearFarm_Combined" Using T_FARM_SPATIAL
file gAgDatWorkingPath + "TMP_YearFarm_Combined.TAB" TYPE NATIVE
It does, however, compile in Version 7 and version 10.
Also, the format of the command did change for Access tables in that the
need for a keyword “Database” was removed when specifying a database name
beween Version 7 and 10.5. Why? Can live with this one though.
I have applied the latest patch to be 10.5.2
Regards
Rob.
-------------------------------------------
Robert Crossley
Managing Director
Agtrix P/L Australia
Far Southern Queensland Office:
Unit 6, 2 Bonanza Drive
Billinudgel NSW 2483
AUSTRALIA
Postal:
PO Box 63
New Brighton 2483
P: 61 (0) 2 6680 1309
M: 61 (0)419 718 642
E: rob...@agtrix.com
W: www.agtrix.com <http://www.agtrix.com/>
S: robertcrossley
28°30'14.81"S
153°31'41.79"E
Brisbane Office:
109 Milsom St
Cooparoo 4151
Queensland
P: 61 7 3843 3363
--
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
Hi Guys,
When creating a table as TYPE NATIVE you don’t need to actually include the clause as this is the default type anyway. You should only need to include the optional type clause if you are creating a table with data format DBF, Access or ODBC. Still, I don’t see why this should be causing a compilation error.
Regards,
Thanks Bo for confirming that.
Not sure what to do now though. Do I write a function that creates a table based on the structure another table? Maybe I can use the version 10 mapBasic compiler, and make sure the users use at least version 10.5 mapinfo, as Version 10 Mapinfo was crashing with code when trying to save a copy of a series of files last night, whereas Version 10.5 Mapinfo worked fine.
Perhaps there was logic in staying on Version 8.5 for so long……
R
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On Behalf Of Bo Victor Thomsen
Sent: Tuesday, 19 July 2011 6:03 PM
To: mapi...@googlegroups.com
Subject: Re: [MI-L] Issues with mapBasic 10.5
Hi Robert -
Thanks Tom,
It also gives me the same error when I save it as an Ascess database error –Unrecognised Error Access.
But compiles fine on Version 10 and below.
R
Hmm.. Have you got MS Office installed? What version? There may be compatibility issues (especially if you are using a 64bit edition of MS Office).
Hello Robert,
If you're copying the structure of one table to make a new one, one method that has always worked is to select with a where condition that is always false, and then save the resulting table to your new output. For example:
select * from OriginalTable where rowid = 0 into TO_SAVE noselect
commit table TO_SAVE as "NewTable"
That said, wasn't even aware of the "using <tablename>" option on the "create table" statement!
Regards,
Warren Vick
Europa Technologies Ltd.
Thanks warren,
That may well work. Damn quicker than writing a function to do it.
Rob.
Warren,
Have replaced all my create table using table instances with the code as suggested. And it compiles in version 10.5 now.
Sometimes the old workarounds have their day in the sun again, even if they didn’t know they were in the shadows.
Thanks.