获取表中的所有字段

 1 static void loopFieldsInTable(Args _args)
 2 {
 3     dictTable dt; 
 4     int numberOfFields; 
 5     int fieldId; 
 6     int i; 
 7     ; 
 8     dt = new dictTable(tableNum(CustTable)); 
 9     //name of table
10     info(dt.name()); 
11     numberOfFields = dt.fieldCnt(); 
12     info(int2str(numberOfFields)); 
13     for (i = 1; i <= numberOfFields; i++)
14     { 
15       fieldId = dt.fieldCnt2Id(i); 
16       info(dt.name()+'.' + dt.fieldName(fieldId)); 
17     }
18 }
posted @ 2012-08-30 10:58  Sprite.z  Views(167)  Comments(0Edit  收藏  举报