Sybase numeric or decimal to character data conversion

For numeric or decimal to character conversions, the precision and scale of the numeric data item are used to determine the output length of the character string. The source length should be the actual length of the numeric data item. The destination length should be precision + 2. If this length is less than the actual length of the result, TDSOVERFLOW is returned.

For character to numeric or decimal conversions, the character string is scanned from left to right to determine precision and scale. You must specify the destination length as 35, or TDS-INVALID-LENGTH is returned. The numeric or data item contains the precision and scale as the first two bytes.