Hi all,
I encountered a problem with the second parameter of the ColumnInfo
statement :
I want to find the name of a column from its number. To do so, I pass the
column number as second parameter (instead of the column name) as indicated
in the documentation. That's where the problem arises; when I pass the
column number as shown in the code below, it gives an error message : "Field
Coli does not exists in table..."
I tried many other ways to write it ("Col"i, Coli) wtihout success.
I also tried to issue a Run Command statement but it would give an
"Unrecognized command : ColumnName" error message.
Any idea/suggestion/workaround?
Thanks in advance
Dim WinNum as integer
Dim WinId as integer
Dim MapNb as integer
Dim LayerNb as integer
Dim LayerNum as integer
Dim TableName as string
Dim ColNb as smallint
Dim i as smallint
Dim ColumnName() as string
For WinNum = 1 to MapNb
WinId = WindowID(WinNum)
LayerNb = MapperInfo(WinId, MAPPER_INFO_LAYERS)
For LayerNum = 1 to LayerNb
TableName = LayerInfo(WinId, LayerNum,
LAYER_INFO_NAME)
ColNb = TableInfo(TableName, TAB_INFO_NCOLS)
ReDim ColumnName(ColNb)
For i = 1 to ColNb
ColumnName(i) =
ColumnInfo(TableName, "coli", COL_INFO_NAME)
Next
Next
Next
Serge Bedard
GIS analyst
GeoCom TMS Inc.
----------------------------------------------
1126 chemin St-Louis #400
Sillery, Qu�bec
CANADA G1S 1E5
Tel.: (418) 650-5500 ext 222
(800) 501-5554
Fax: (418) 650-3291
http://www.geocomTMS.com/ <http://www.geocomTMS.com/>
----------------------------------------------
Carpe diem
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]