如何判断当前字符串是不是Table
static void TestTableName(Args _args)
{
str tmpStr = "TableName";
;
if (TableName2Id(tmpStr))
{
info("It is a table");
}
else
{
info("Sorry,it is not a table");
}
}
// another method
static server boolean checkTableName(str 50 _str)
{
Dictionary dictionary ;
int tableCnt ;
int i ;
TableId tableId ;
;
dictionary = new Dictionary() ;
tableCnt = dictionary.tableCnt();
for (i = 1 ; i <= tableCnt ; i++)
{
tableId = dictionary.tableCnt2Id(i) ;
if ( _str == dictionary.tableName(tableId) )
{
return true ;
}
}
return false ;
}

浙公网安备 33010602011771号