0 Replies Latest reply on Jun 27, 2006 5:35 PM by Erica Kane

    Sybase IDENTITY primary key autogeneration workaround

    Erica Kane Newbie

      I hope this helps someone, because it was very painful for me to figure out.

      Sybase provides an IDENTITY column which is very useful for autogenerating primary keys for entity beans. However, if version 6.05 of jConnect (the standard Sybase driver) is used -- jConn3.jar -- with com.sybase.jdbc3.jdbc.SybDriver, all inserts fail with a message that it was not possible to obtain the generated identity.

      Changing the datasource configuration to use the older driver class com.sybase.jdbc2.jdbc.SybDriver fixes the problem.