Server-side JDBC features

JDBC 1.2 is part of JDK 1.1. JDBC 2.0 is part of Java 2 (JDK 1.2).

Java in the database supplies a subset of the JDK version 1.1, so the internal JDBC driver supports JDBC version 1.2.

The internal JDBC driver (asajdbc) makes some features of JDBC 2.0 available from server-side Java applications, but does not provide full JDBC 2.0 support.

The JDBC classes in the java.sql package that is part of the Java in the database support are at level 1.2. Server-side features that are part of JDBC 2.0 are implemented in the sybase.sql.ASA package. To use JDBC 2.0 features you must cast your JDBC objects into the corresponding classes in the sybase.sql.ASA package, rather than the java.sql package. Classes that are declared as java.sql are restricted to JDBC 1.2 functionality only.

The classes in sybase.sql.ASA are as follows:

JDBC class

Sybase internal driver class

java.sql.Connection

sybase.sql.ASA.SAConnection

java.sql.Statement

sybase.sql.ASA.SAStatement

java.sql.PreparedStatement

sybase.sql.ASA.SAPreparedStatement

java.sql.CallableStatement

sybase.sql.ASA.SACallableStatement

java.sql.ResultSetMetaData

sybase.sql.ASA.SAResultSetMetaData

java.sql.ResultSet

sybase.sql.SAResultSet

java.sql.DatabaseMetaData

sybase.sql.SADatabaseMetaData

The following function provides a ResultSetMetaData object for a prepared statement without requiring a ResultSet or executing the statement. This function is not part of the JDBC standard.

ResultSetMetaData sybase.sql.ASA.SAPreparedStatement.describe()

JDBC 2.0 restrictions

The following classes are part of the JDBC 2.0 core interface, but are not available in the sybase.sql.ASA package:

The following JDBC 2.0 core functions are not available in the sybase.sql.ASA package:

Class in sybase.sql.ASA

Missing functions

SAConnection

java.util.Map getTypeMap()

void setTypeMap( java.util.Map map )

SAPreparedStatement

void setRef( int pidx, java.sql.Ref r )

void setBlob( int pidx, java.sql.Blob b )

void setClob( int pidx, java.sql.Clob c )

void setArray( int pidx, java.sql.Array a )

SACallableStatement

Object getObject( pidx, java.util.Map map )

java.sql.Ref getRef( int pidx )

java.sql.Blob getBlob( int pidx )

java.sql.Clob getClob( int pidx )

java.sql.Array getArray( int pidx )

SAResultSet

Object getObject( int cidx, java.util.Map map )

java.sql.Ref getRef( int cidx )

java.sql.Blob getBlob( int cidx )

java.sql.Clob getClob( int cidx )

java.sql.Array getArray( int cidx )

Object getObject( String cName, java.util.Map map )

java.sql.Ref getRef( String cName )

java.sql.Blob getBlob( String cName )

java.sql.Clob getClob( String cName )

java.sql.Array getArray( String cName )