Chris,

When you say that TableInfo() doesn't work, are you then refering to 
TableInfo(1,19) ?

Here is what I would recommend that you do:
1. Open all the tables that should be updated (I assume that the column to be 
updated already exists?)
2. Open the MapBasic window
3. Write this into the MapBasic window:
        Update TableInfo(1,1) Set TABFILENAME = TableInfo(1,19) Commit Table 
TableInfo(1,1) Close Table TableInfo(1,1)
Note that
        - these commands update, save and close the table. In this way the 
first table will be a different one next time
        - I assume that the name of the column to hold the file name is 
TABFILENAME, change it if necessary

4. Now place the cursor in the line and hit enter until you get the message 
"Table 1 is not open" or something similar

I know this isn't as smart as a loop but it works !

Peter Horsbøll Møller
GIS Developer, MTM
Geographical Information & IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel     +45 6311 4900
Direct  +45 6311 4908
Mob     +45 5156 1045
Fax     +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis

COWI har fået ny hjemmeside. Ydelserne GIS og IT, kort, kortlægning, 3D 
visualisering og arealforvaltning ligger under SAMFUND. Se mere her : 
www.cowi.dk

COWI has changed its homepage. Our services within cadastre and 
landadministration, geodataproducts, mapping and GIS can be seen under SOCIETY. 
See our services here: www.cowi.com


-----Original Message-----
From: Brown, Christopher (RTIO) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 11, 2005 5:03 AM
To: MapInfo-L
Subject: MI-L Update Column with Table_Name?


List,

I need to update a character column in 140+ MapInfo tables with the filename of 
the table? Normally I run multiple commands in the MapBasic window to say 
update the structure of multiple tables i.e. Alter Table "M20542CU" ( add 
Sheet_id Char(50) ) Interactive

 

My MapBasic skills rise only to the MapBasic window in MI Pro and the function 
"TableInfo" does not work (MI Pro v7.5). Therefore I can only assume that this 
could be done in MapBasic. But how?

 

Would anyone be able to point me in the right direction of an existing MBX or 
supply me with some simple code to help me on my way with a newly installed 
MapBasic v7?

 

Regards,
Chris

Chris Brown - GIS Admin/Cartographer 
Strategic Assets
Rio Tinto Iron Ore
Tel.    +61 8 9327 2176
Fax.    +61 8 9327 2478 
Mob. 0412 358 640
mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> .riotinto.com.au 
http://www.hamersleyiron.com/ <http://www.hamersleyiron.com/>
 
This email (including all attachments) is the sole property of Rio Tinto 
Limited and may be confidential.  If you are not the intended recipient, you 
must not use or forward the information contained in it.  This message may not 
be reproduced or otherwise republished without the written consent of the 
sender.  If you have received this message in error, please delete the e-mail 
and notify the sender.

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 17450

Reply via email to