用循环得到表中所有的字段

static void loopFieldsInTable(Args _args)

{

    dictTable dt;

    int numberOfFields;

    int fieldId;

    int i;

    ;

    dt = new dictTable(tableNum(CustTable));

    //name of table

    info(dt.name());

    numberOfFields = dt.fieldCnt();

    info(int2str(numberOfFields));

    for (i = 1; i <= numberOfFields; i++)

    {

      fieldId = dt.fieldCnt2Id(i);

      info(dt.name()+'.'+dt.fieldName(fieldId));

    }

}

posted @ 2009-04-26 12:19  Fandy Xie  Views(225)  Comments(0Edit  收藏  举报