Obtains numeric data from the DynamicDescriptionArea after you have executed a dynamic SQL statement.
DynamicDescriptionArea.GetDynamicNumber ( index )
Argument |
Description |
---|---|
DynamicDescriptionArea |
The name of the DynamicDescriptionArea, usually SQLDA. |
index |
An integer identifying the output parameter descriptor from which you want to get the data. Index must be less than or equal to the value in NumOutputs in DynamicDescriptionArea. |
Double. Returns the numeric data in the output parameter descriptor identified by index in DynamicDescriptionArea. Returns 0 if an error occurs. If any argument’s value is null, GetDynamicNumber returns null.
Use GetDynamicNumber when the value of OutParmType is TypeInteger!, TypeDecimal!, TypeDouble!, TypeLong!, TypeReal!, or TypeBoolean! for the value that you want to retrieve from the array.
If you use this function to return a decimal value, expect the value to be rounded when you convert the double datatype back to a decimal. Doubles do not support the same precision as decimals.
These statements set DeptId to the numeric data in the second output parameter descriptor:
Integer DeptId
DeptId = SQLDA.GetDynamicNumber(2)
For an example of retrieving data from the DynamicDescriptionArea, see GetDynamicDate.