Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Datatype Class
A Datatype is a named type that can be associated with attribute or method types. It typically is related to either code engineering or database modeling. Datatypes also indicate which language or database system they relate to. Datatypes can be accessed using the Repository Datatypes collection.
Associated table in .EAP file: t_datatypes
Datatype Attributes:
Attribute |
Type |
Notes |
---|---|---|
DatatypeID |
Long |
Read/Write The instance ID for this datatype within the current model; this is system maintained.
|
DefaultLen |
Long |
Read/Write The default length (DDL only).
|
DefaultPrec |
Long |
Read/Write The default precision (DDL only).
|
DefaultScale |
Long |
Read/Write The default scale (DDL only).
|
GenericType |
String |
Read/Write The associated generic type for this data type.
|
HasLength |
String |
Read/Write Indicates whether the datatype has a length component.
|
MaxLen |
Long |
Read/Write The maximum length (DDL only).
|
MaxPrec |
Long |
Read/Write The maximum precision (DDL only).
|
MaxScale |
Long |
Read/Write The maximum scale (DDL only).
|
Name |
String |
Read/Write The datatype name (such as integer). This appears in the related drop-down datatype lists where appropriate.
|
ObjectType |
Read only Distinguishes objects referenced through a Dispatch interface.
|
|
Product |
String |
Read/Write The datatype product, such as Java, C++ or Oracle.
|
Size |
Long |
Read/Write The datatype size.
|
Type |
String |
Read/Write The type can be DDL for database datatypes or Code for language datatypes.
|
UserDefined |
Long |
Read/Write Indicates if the datatype is a user defined type or system generated. Datatypes distributed with Enterprise Architect are all system generated. Datatypes created in the Datatype dialog are marked 1 (true).
|
Datatype Methods
Method |
Type |
Notes |
---|---|---|
GetLastError () |
String |
Returns a string value describing the most recent error that occurred in relation to this object. This function is rarely used as an exception is thrown when an error occurs.
|
Update () |
Boolean |
Updates the current Datatype object after modification or appending a new item. If false is returned, check the GetLastError function for more information.
|