SybDriver. setVersion Method

The setVersion method affects the jConnect default behavior for all connections created by the SybDriver object.

You can call setVersion multiple times to change the version setting. New connections inherit the behavior associated with the version setting at the time the connection is made. Changing the version setting during a session does not affect current connections. You can use the com.sybase.jdbcx.SybDriver.VERSION_LATEST constant to ensure that you are always requesting the highest version value possible for the jConnect driver you are using. However, by setting the version to com.sybase.jdbcx.SybDriver.VERSION_LATEST, you may see behavior changes if you replace your current jConnect driver with a newer one.

This code sample shows how to load the jConnect driver and set its version:
import java.sql.DriverManager;
import com.sybase.jdbcx.SybDriver;
SybDriver sybDriver = (SybDriver)
   Class.forName("com.sybase.jdbc4.jdbc.SybDriver")
   .newInstance();
sybDriver.setVersion(com.sybase.jdbcx.SybDriver.
   VERSION_7);
DriverManager.registerDriver(sybDriver);