Other Datatypes supported

jConnect supports the following Adaptive Server datatypes:


Bigint datatype

Sybase supports bigint, which is a 64-bit integer datatype that is supported as a native Adaptive Server datatype. In Java, this datatype maps to java datatype long. To use this as a parameter, you can call PreparedStatement.setLong(int index, long value) and jConnect sends the data as bigint to Adaptive Server. When retrieving from a bigint column, you can use the ResultSet.getLong(int index) method.


Unitext datatypes

There are no API changes in jConnect for using the unitext datatype. jConnect can internally handle storage and retrieval of data from Adaptive Server when unitext columns are used.


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 if you want 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, you should get the next higher integer value ResultSet.getLong(). You can use the following table to set or get data.

Adaptive Server datatype

Java datatype

unsigned smallint

setInt(), getInt()

unsigned int

setLong(), getLong()

unsigned bigint

setBigDecimal(), getBigDecimal()