New datatypes supported

jConnect supports the following new datatypes:


Bigint datatype

Sybase supports bigint, which is a 64-bit integer datatype that is supported as a native ASE 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 ASE. When retrieving from a bigint column, you can use the ResutSet.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 ASE when unitext columns are used.


Unsigned int datatypes

In this release, ASE has introduced unsigned bigint, unsigned int, and unsigned smallint as native ASE 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.

ASE datatype

Java datatype

unsigned smallint

setInt(), getInt()

unsigned int

setLong(), getLong()

unsigned bigint

setBigDecimal(), getBigDecimal()