The following are simple data types of attributes:
sdaiINTEGER
sdaiREAL
sdaiNUMBER
sdaiBOOLEAN
sdaiLOGICAL
sdaiSTRING
sdaiINSTANCE
Any application instance can contain attributes of any data type listed above.
To get access to an attribute, use the sdaiGetAttrBN()
function in the following routine:
A placeholder for the attribute value.
The function fills it with the attribute value if successful or NULL otherwise.
The code fragment illustrates how to get an attribute represented with an instance.
Below you can find another example of getting access to a simple attribute value: a string value of the version.
In the first case, it is retrieved as a string and the
sdaiGetAttrBN() function
returns it successfully; in the second case, you can see an attempt to get a string attribute as an integer value.
This attempt fails; the sdaiGetAttrBN() function
returns NULL, and the sdaiErrorQuery() function returns an sdaiVT_NVLD value.