Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates a new instance of the SQLDataDictionaryPermission class.
Syntax
public void new(IdentifierName methodName)
Run On
Called
Parameters
- methodName
Type: IdentifierName Extended Data Type
The string that represents the name of the method to be called.
Examples
The following code example deletes the data in the xRefNames table.
server static void main(Args _args)
{
DictTable dictTable = new DictTable(tablenum(xRefNames));
str sqlTableName;
SqlDataDictionary sqlTable;
if (dictTable && dictTable.enabled())
{
sqlTableName = dictTable.name(DbBackend::Sql);
sqlTable = new SqlDataDictionary();
// Only try to truncate if the table does exist
// in the SQL database
if (sqlTable.tableExist(sqlTableName))
{
new SqlDataDictionaryPermission(
methodstr(SqlDataDictionary, tableTruncate)).assert();
sqlTable.tableTruncate(tablenum(xRefNames));
CodeAccessPermission::revertAssert();
}
}
}
See Also
SqlDataDictionaryPermission Class