.NET Customisation User Guide

.NET Customisation : Database Interface : Element Access : Database Modifications
Check that the attribute value is the right type - i.e. if a text attribute then the new value must be text, for example: setting DESC to 99 will raise an error.
Check against any valid values or ranges - This will check the value against any user provided criteria stored in the dictionary DBs.
Check access control - An error will be raised if the modification is not allowed. An error will also be raised at this point if the attribute is not valid for the given element.
Check that the DB is open in write - An error will be raised if 'read only'.
Check LOCK flag - An error will be raised if the LOCK flag is true.
Call the legality checking routines to make sure that the modification is valid - These checks are made by the plugged in application specific code. Thus potentially any error could be raised.
There are some methods on DbElement to claim/release individual elements or a hierarchy of elements. If working on a hierarchy of elements, and errors occur, then the system will still do what it can.
ele.SetAttribute(ATT.DESC, "Example description");
There is a boolean method IsAttributeSetable to test if a given attribute may be set. This does not take the new value, so it is possible that the actual setting will still fail if the new value is invalid.
There is a separate class DbCopyOption to hold the options when doing a copy. These options are only available when copying an element and all its descendants.
There is a boolean method IsCopyable to test if an element can be copied.
There is a boolean method IsInsertable to test if an element can be moved.

1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Logo