static void GetFieldType(Args
_args)
{
SysDictField df;
dictTable dt;
TableId tableId =
tablenum(InventTable);
int i;
;
dt=new
Dicttable(tablenum(InventTable));
for(i=1;i<=dt.fieldCnt();i++)
{
df = new
SysDictField(dt.id(),dt.fieldCnt2Id(i));
switch (df.baseType())
{
case Types::Date:
info(' Field Name:
'+dt.fieldName(dt.fieldCnt2Id(i))+
' Data Type: '+'Date'+'
size:'+int2str(df.fieldSize()));
break;
case Types::Integer:
info(' Field Name:
'+dt.fieldName(dt.fieldCnt2Id(i))+
' Data Type: '+ 'Integer'+'
size:'+int2str(df.fieldSize()));
break;
case Types::String:
info('Field Name:
'+dt.fieldName(dt.fieldCnt2Id(i))+
' Data Type: '+'String'+'
size:'+int2str(df.fieldSize()));
break;
case Types::Integer:
info('Field Name:
'+dt.fieldName(dt.fieldCnt2Id(i))+
' Data Type: '+'String'+'
size:'+int2str(df.fieldSize()));
break;
case Types::DateTime:
info('Field Name:
'+dt.fieldName(dt.fieldCnt2Id(i))+
' Data Type: '+'String'+'
size:'+int2str(df.fieldSize()));
break;
}
}
}
No comments:
Post a Comment