|
Or you could use the Alias variable to hold the table and column
names
Dim aCol As Alias,
selColumnId as integer, selColumnName as
String
selColumnId = <number retrieved from dialog>
aCol =
"MyTable." & selColumnName
select aCol from
MyTable HTH,
Peter Horsbøll Møller From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer Simpson Sent: Thursday, October 05, 2006 4:56 PM To: 'Francois Blanc'; [email protected] Subject: RE: [MI-L] Dynamic expressions in select clauses Run Command
"Select"+selColumnName+" from "+MyTable or
Run Command
"Select"+selColumnName+" from MyTable" depending on whether
MyTable is a variable or not. HTH Spencer From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Francois Blanc Hi, I have been trying unsuccessfully to pass a dynamic
_expression_ into a select clause in MapBasic. I thought it would be straitforward
but somehow it is trickier than I expected. Here is what I
did First I retrieved column number n in MyTable from a list in a
dialog box (works fine). I would then like to select that column from
the table. I wrote the following code: Dim selColumnId as
integer Dim selColumnName as
String selColumnId = <number retrieved from
dialog> selColumnName = ColumnInfo(MyTable,"col"+selColumnId,COL_INFO_NAME) select selColumnName from
MyTable This gives me a single column filled with the String
<columnName>. Any idea how I should proceed
instead? Thanks, Francois
Blanc |
_______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
