Unsigned Int Datatypes

Adaptive Server supports unsigned bigint, unsigned int, and unsigned smallint as native Adaptive Server datatypes.

Because, there are no corresponding unsigned datatypes in Java, you must set and get the next higher integer to process the data correctly. For example, if you are retrieving data from an unsigned int, using the Java datatype int is too small to contain positive large values, and as a result, ResultSet.getInt (int index) might return incorrect data or throw an exception. To process the data correctly, get the next higher integer value ResultSet.getLong().

Adaptive Server Datatype

Java Datatype

unsigned smallint

setInt(), getInt()

unsigned int

setLong(), getLong()

unsigned bigint

setBigDecimal(), getBigDecimal()