Database table with identity column

Author: (danieto)

When using MS SQL Server for the database backend, how can I handle primary key's that are defined as Identity columns? By default Uniface will create the Insert stored procedure forcing the value into the primary key, raising an error from the SQL Server database. My environment is Uniface 9.6 with SQL Server 2008 as DB. Regards, Alejandro


  1. Hi Alejandro, perhaps the helpfile (ULIBRARY.CHM) section of your database connector gives you the required information. If this information is not there, use the new helpfile feedback functionality to report this back to CPWR so it will be included there shortly and just have a word with your local CPWR contact for immediate answers.

    Author: ulrich-merkel (
  2. danieto, as far as I can make out the answer is that you can't use identity columns. I do have a wish logged in the wishlist for this feature. You can use them within the database, but not in uniface if you define them as non-database fields in the model, but since uniface does not then recover the data, you can't use them for relational integrity, which kind of defeats the point.

    Author: Iain Sharp (