Siebel VB Language Reference > Using Siebel VB > About Data Types >

How Siebel VB Converts Data Types


This topic describes the conversions that occur between the data types that Siebel VB supports. It does not support any other conversions. It does not automatically do conversions between numeric and string data:

Numeric Conversion

If Siebel VB converts data from a larger number type to a smaller number type, then a run-time numeric overflow might occur. This situation indicates that the value of the larger type is too large for the target data type. Imprecision is not a run-time error. For example, when converting from double to single, or from float to a larger or a smaller type. Converting a long number to an integer is an example of converting a larger type to a smaller type.

String Conversion

If Siebel VB converts data from a fixed string to a dynamic string, then it creates a dynamic string that includes the same length and contents as the fixed string. If it converts a dynamic string to a fixed string, then it does the following work:

  • If the dynamic string is shorter than the fixed string, then it extends the fixed string with spaces.
  • If the dynamic string is longer than the fixed string, then it truncates the fixed string.

A string conversion does not cause run-time errors.

Variant Conversion

Siebel VB can convert data between any data type and a variant. It can convert a variant string to a number. If the variant string does not contain a valid representation of the number, then a type mismatch error occurs.

Siebel VB Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.