以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  字段变量问题求助  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=20407)

--  作者:syzgt
--  发布时间:2012/6/7 20:13:00
--  字段变量问题求助
表A 有字段n1,n2,n3 Dim nsta as String = "n2" 因程序的需要这里的"n2"是变化的,也许是"n3" 那么cols( )括号里的表达式如写 k 才可以计算出A表中"n2"字段,或"n3"的位置? dim k as Integer =tables("A").cols( ?nsta ).Index
--  作者:狐狸爸爸
--  发布时间:2012/6/8 8:01:00
--  

Dim nsta as String

nsta = “n2”

Dim k as Integer =tables("A").cols(nsta ).Index