About strong data types
Beginning with version 6 of the (Mongoose) framework, the system accesses dates and numbers differently than it did with earlier versions. Specifically:
In Framework Version 5 and earlier | In Framework Version 6 and later |
---|---|
Data from the middle tier was in the form of COM variants and so had inherent data type information. | Data is no longer in the form of COM variants, so in some cases, data no longer has inherent data type information. This is because all data is string, in internal format, and data type information comes only from metadata. |
VBA code that manually manipulated IDOs used RSDAO, a COM API. | RSDAO is no longer used. The equivalent code uses the IDOProtocol framework classes available by means of the IDOClient property. |
Custom middle-tier code used Visual Basic 6 APIs. | The IDOProtocol framework classes are used in place of the Visual Basic 6 APIs. |
VBA performed some automatic data type conversions. | VB.NET requires that some of the data type conversion code must be changed to use explicit casts or variables declared with strong data types. |
For IDOProtocol development, use strongly typed variables for dates and numbers, and the GetValue or SetValue APIs to perform the correct locale-specific formatting. The Value property gets or sets a string, which uses an internal format. This is used only in rare cases.
In version 6 of the framework, each of the three objects exposed in the WinStudio API (components, IDO collection properties, and variables) has a set of APIs parallel to the functionality of the IDOProtocol's property and method parameter APIs:
- A read-write Value property that provides a string internal format, regardless of data type.
- A set of GetValue() and SetValue() accessors that support strong data type conversions from or to the internal format.
Parameters passed to WinStudio global scripts have a similar subset of read-only APIs:
- A read-only Value property that provides a string internal format, regardless of data type.
- A set of GetValue() accessors that support strong data type conversions from the internal format.
For sample scripts, see Sample Scripts with APIs for Strong Data Types.