Using PowerBuilder 12.5...
My client stored a value in a long and saved it to the database. Eventually the values exceeded the amount possible in a long so it started storing negatives in the database. I know how to recover the original number if it is an integer that overflowed:
ABS(ai_int) + ((32768 - abs(ai_int)) * 2)
but using the same formula with the size of a long
in 32768 does not work. Can someone help me get the negative number back to what the user wanted?