25. Sybase Adaptive Server
Prev | Appendix 2. Supported Databases | Next

## 25. Sybase Adaptive Server

Example 2.25. Example properties for Sybase

    openjpa.ConnectionDriverName: com.sybase.jdbc2.jdbc.SybDriver
    openjpa.ConnectionURL: \
        jdbc:sybase:Tds:SERVER_NAME:4100/DB_NAME?ServiceName=DB_NAME&BE_AS_JDBC_COMPLIANT_AS_POSSIBLE=true

### 25.1. Known issues with Sybase

- The "`DYNAMIC_PREPARE`" parameter of the Sybase JDBC driver cannot be used with OpenJPA.

- Datastore locking cannot be used when manipulating many-to-many relations using the default OpenJPA schema created by the schematool, unless an auto-increment primary key field is manually added to the table.

- Persisting a zero-length string results in a string with a single space character being returned from Sybase, Inc.'s JDBC driver.

- The `BE_AS_JDBC_COMPLIANT_AS_POSSIBLE` is required in order to use datastore (pessimistic) locking. Failure to set this property may lead to obscure errors like " `FOR UPDATE can not be used in a SELECT which is not part of the declaration of a cursor or which is not inside a stored procedure.` ".

- Applications performing update/insert data of the BigDecimal Java type may fail with OptimisticException if the data exceeds the scale or precision of the column on Sybase. To avoid this problem, applications can specify the precision and scale for the numeric type by setting numericTypeName='NUMERIC(p,s)' for the column type mapped by the BigDecimal Java type. See openjpa.jdbc.DBDictionary for more detail. Alternatively, application can set the precision and scale using the standard `Column` annotation, described in Section 3, “ Column ”.

Prev | Up | Next
24. IBM solidDB | Home | Appendix 3. Migration Considerations