Terry,
You can use the column Alias for renaming the columns.
Select NAME_CUTOF1 "Much more meaningful name 1", NAME_CUTOF1 "Much more
meaningful name 2"
From sTab
I guess you should do this thru Run Command in your MapBasic application:
For i = 1 To NumCols(sTab)
sCol = ColumnInfo(sTab, "COL"+1, COL_INFO_NAME)
if sCmdStr = "" Then
sCmdStr = "Select " + sCol + " " + Char$(34) +
GetMeaningfulColumnName$(sCol) + Chr$(34)
else
sCmdStr = sCmdStr + ", " + sCol + " " + Char$(34) +
GetMeaningfulColumnName$(sCol) + Chr$(34)
end if
Next
where the function GetMeaningfulColumnName$() will return the meaningful name
for the column
HTH,
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: Terry McDonnell [mailto:[EMAIL PROTECTED]
Sent: Monday, October 17, 2005 1:54 PM
To: [EMAIL PROTECTED]
Subject: MI-L Need to display data in a grid
Hi List
I don't expect this can be done but here goes:
My users can select a table to view its contents. The table is picked from a
list and can have any number of columns, each representing a census named
population, e.g. "Children under 5", "Ethnic minorities", "car owners" -
whatever. I've no way of knowing what col's will exist, or how many, until the
file is selected.
Ideally I'd like to display the table in a grid, on a form, but these concepts
don't seem to exist in MI/MB - only dialogs. As far as I can see I can only
display the data in a browse window, but then I won't get meaningful column
names - only the table's field names. These tables are derived from Foxpro
tables and, as such, are registered from dBASE III tables (Foxplus), and so the
field/col names are 10 chars max.
I do have the meaningful names, mapped against the col names, in another table.
Any ideas?
'ppreciate it
Terry McDonnell
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 18324