Float field limitation

Author: jean-philippe.dumont@telus.com (jpdumon)

Hi everyone !

We have a little problem here.  We have a float database field (sybase) and for the first time we have to put a value greater than 999999.99 in this field.  The problem is that in our Uniface apps, the Unifield is a FLoating Decimal Point  Data Type and from what I can see, it's impossible to make this field greater than F8 so the field don't allow me to use greater values.  For many reason, i can't change the Unifield to use another format and than convert the value before I insert in the database. 

Do you know if it's possible to have more than a F8 Interface on a Floating Point field ???

 

Thank you !

4 Comments

  1. ------ UnifAce library ------------ For example, the maximum accuracy of the mantissa section of an F4 field could be 1.234567 (which is then multiplied by the exponent) and for an F8 field 1.23456789012345. These figures are DBMS-dependent; for more information, see your DBMS documentation. Uniface guarantees an accuracy of six digits for F4, and 14 digits for F8, as specified in the ANSI/IEEE 75-1985 standard. -------------------------------------- So it should be possible to store numbers up to 999999999999.99 in such a field Ingo


    Author: istiller (i2stiller@gmx.de)
  2. Hi

    For floats stored as floats in database, it depends on your database possibilities (I guess a F8 or H8 packing code is the best you can have).
    If you're ready to store your floats as ASCII strings, Uniface can handle floats upto 16 bytes interface definition (at least in Uniface 9). When storing such a float, Uniface will ask its DBMS connector to store a raw data value corresponding to a float packing code. I guess the Sybase connector is well defined, so that a F16 will be mapped to a string representation rather than a F8 truncated value.

    P.S.: it would be cool to have a Compuware feedback for database packing code support. Packing codes are well documented, but their use (and redefinitions) in DBMS connectors is completly opaque. Knowing the supported (redefined) packing code, and corresponding connector-level packing codes mappings might help a lot.

    Kind regards,
    Richard


    Author: richard.gill (richard.gill@agfa.com)
  3. Hi Richard,

    this mapping of codes is documented in the DBMS connector's documentation (at least this was when I studied the PDFs).

    But I still see the problem because it is so easy in uniface to connect another database (a big PRO for uniface):
    as a uniface-coder: why should I care about how a specific connector wil map the interface
    (as long as the mapped datatype can handle the limits documented for the uniface interface code).

    Success, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  4. Sorry, I misunderstood your question :)

    F8 should significate 8-byte float (64bits), not 8 characters float string (it's nearer I4 than N4 if you prefer). So storing values greater than 999999.99 should not be a problem, or I missing something ?

    I tried in a sample the IEEE Floating point format, but it maps to H8 in interface definition. So F8 is the only solution I guess.


    Author: richard.gill (richard.gill@agfa.com)