New jConnect 5.5 connection properties

Table 5 lists new connection properties available for jConnect 5.5. For a complete list of connection properties, refer to Chapter 2, “Programming Information,” in the jConnect for JDBC 5.5 Programmer’s Reference.

Table 5: Connection properties for jConnect 5.5

Property

Description

Default value

CACHE_COLUMN_METADATA

Use this property to allow jConnect to cache ResultSet Metadata on consecutive executions when DYNAMIC_PREPARE is set to true. This helps to improve performance.

False

CAPABILITY_TIME

Use this property only when JCONNECT_VERSION is greater than or equal to 6. When jConnect is connected to a server that supports the TIME datatype, all parameters of type java.sql.Time or escape literals {t ...} are processed as TIME. The previous versions of jConnect treat such parameters as DATETIME and prefixes "1970-01-01" to the java.sql.Time parameter. The date also gets stored in the database if the underlying datatype is datetime or smalldatetime. In the new versions of jConnect, when TIME is processed, the server converts TIME to the underlying datatype and adds its own base year as a prefix. This can result in incompatibilities between the old and new data. If you are using datetime or smalldatetime datatypes for java.sql.Time, you should leave CAPABILITY_TIME as false for backward compatibility. Leaving this property to be set as false forces jConnect to process java.sql.Time parameters or escape literals {t ...} as DATETIME regardless of the server capability of handling TIME datatype. Setting this property to true causes jConnect to process the java.sql.Time parameters as TIME datatype when connected to ASE 12.5.1 or later. Sybase recommends that you leave this property as false if you are using smalldatetime or datetime columns to store time values.

False

CAPABILITY_WIDETABLE

This property can be set to false as a performance improvement, if you do not require JDBC ResultSetMetaData like column name. This results in lesser data exchange over the network, thereby increasing performance. Sybase recommends that you use the default setting unless you are using EAServer. See “Using wide table support for ASE 12.5 and later,” in Chapter 2 of the jConnect for JDBC Programmer’s Reference.

True

CRC

When this property is set to true, the update counts that are returned are cumulative counts that include updates directly affected by the statement executed and any triggers invoked as a result of the statement being executed.

False

DATABASE

Use this property to specify the database name for a connection when the connection information is obtained from a Sybase interfaces file. The URL of an interfaces file cannot supply the database name.

Null

IMPLICIT_CURSOR_FETCH_SIZE

Use this property in conjunction with the SELECT_OPENS_CURSOR property to force jConnect to open a read-only cursor on every select query that is sent to the database. The cursor will have a fetch size of the value set in this property, unless overridden by the Statement.setFetchSize method.

0

QUERY_TIMEOUT_CANCELS_ALL

Use this property to force jConnect to cancel all statements on a connection when a read timeout is encountered. This behavior can be used when a client calls execute() and a timeout occurs because of a deadlock, for example, when it tries to read from a table that is being updated in another transaction. Depending on future discussions with Sun, this property may be combined with the property values affected by BE_AS_JDBC_COMPLIANT_AS_POSSIBLE property.

False

SERVER_INITIATED_TRANSACTIONS

This property allows the server to control transactions. By default, the property is set to true, and jConnect allows the server to start and control transactions by using Transact-SQL® set chained on. If the property is set to false, the transactions are started and controlled by jConnect using transact sql begin tran. Sybase recommends that you allow the server to control the transactions.

True

SERVERTYPE

This property can be set to "OSW" when you are connected to OpenSwitch™. This allows jConnect to send certain instructions to OpenSwitch, which allows OpenSwitch to remember initial connection settings, such as isolation level, textsize, quoted identifier, and autocommit, even when it is moved to a different server instance.

None

TEXTSIZE

Use this property to set the TEXTSIZE. By default, ASE and ASA allow 32,627 bytes to be read from an image or text column. jConnect changes the value to 2GB if you have the jConnect mda tables installed. However, setting this value when connected to OpenSwitch allows the connection to remember the settings when OpenSwitch is moved to a different server instance.

2GB