Sybase unsigned int and bigint support in Uniface 8.4 and 9.x

Author: zoltan.seres@gmail.com (ZoliZoli)

Hi,   anybody has any experience using Sybase unsigned int datatype in Uniface? Is it supported in Uniface or numeric can be used/mapped instead? I searched through the docs but could find a definite answer yet. Any hint appreciated... Best, Zoltan    

2 Comments

  1. Hi Zoltan, The unsigned int datatype is a new addition in Sybase ASE 15, and we have not done anything specific to "support" this. Actually there is no need to do anything, as the storage is the same as for normal integers. The only difference being you cannot store negative values in it. So for example if your Uniface field is Numeric I4, it will work find whether the column is defined as "int" or "unsigned int".  We do not have an "unsigned numeric" datatype in Uniface, so your application would have to make sure it does not try to store negative values. Trying to do so will result in a store error with the message Arithmetic overflow during implicit conversion of INT value '-nnn' to a UNSIGNED INT field. (SYBASE SQL Server Error=247 Severity=16 State=1 Line=1) SYBASE Server Name: XXXXXXXXX CT-LIB error : ct_results failed (SYB Driver Error = -227) I hope that sufficiently answers your query.   Chris Breemer Uniface Technical Support  


    Author: Chris Breemer (chris.breemer@uniface.com)
  2. Hi Crhis,   thanks for your answer! So you say a Uniface numeric i4 will work with Sybase unsigned int but what will it show if the retrieved number is greater than the max int value (2147483647). Will the retrieve fail? And can be a number greater than max int stored from Uniface into an unsigned int? I guess not. Is it an option to use numeric i8 instead and make sure the value is between 0 and max unsigned int (4294967296)? Thanks for your help! Zoltan  


    Author: ZoliZoli (zoltan.seres@gmail.com)