Problem to store text field to table with identity in Sybase[U9.4]

Author: (slivo)

Hello, we have a problem to store new record with text field to table with identity primary key field in Sybase - Uniface 9.4. In new record which we try store in Uniface to Sybase we put value -1 to identity primary key field, which sybase replaced with identity number. Problem is that Uniface doesnt store text field in one insert/query but in more steps/query. First insert puts NULL value to text field and then second query update text field in inserted record. But Uniface in second query/update doesnt know identity number which Sybase assigned to record in first insert and try to update text field in record with -1 value in primary key and Sybase raise an error that we tried to update record which doesnt exists. Is there any solution to this problem? Or is it feature of Uniface? Thank you Slivo


  1. There is a quite detailed explanation of the the use of Sybase identity columns in Uniface in the Help. It is in topic "Sybase Identity Fields" of the ulibrary.chm. Do what it says and everything should work.

    Author: Theo Neeskens (
  2. thanks for hint, it works when we put string value '@@identity' to identity field in write trigger for new records

    Author: slivo (