B
Bill L.
We recently noticed that the vb.net CStr function yields different
results than the vb6 version when converting SQL decimal data. If, for
example, the data is defined in SQL as decimal(19,10), the vb.net CStr
function will return ten digits to the right of the decimal,
regardless of the data value. In this case, if the data value is 5,
the vb.net CStr function will return 5.0000000000. The vb6 CStr
function will simply return 5. In other words, the vb.net CStr
function always returns digits the length of the scale value after the
decimal. The vb6 CStr function will not return the trailing zeroes.
Why?
Thanks, Bill
results than the vb6 version when converting SQL decimal data. If, for
example, the data is defined in SQL as decimal(19,10), the vb.net CStr
function will return ten digits to the right of the decimal,
regardless of the data value. In this case, if the data value is 5,
the vb.net CStr function will return 5.0000000000. The vb6 CStr
function will simply return 5. In other words, the vb.net CStr
function always returns digits the length of the scale value after the
decimal. The vb6 CStr function will not return the trailing zeroes.
Why?
Thanks, Bill