Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Data Types

edited May 2002 in General
I'm working with a data dictionary and no have problems until now. In my
tables(Interbase 6), numeric fields are defined how Decimal and in data
dictionary I connect decimal fields with dtLongInt type.
The problem is : If SQL query in report is edited, that fields turn to
string type.
Why this problem occurs?

Comments

  • edited May 2002
    Why are you defining decimal as long int? Decimal fields should be defined
    as dtSingle or dtDouble floating point types.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited May 2002
    Ok, but when I edit the sql in report, the datadictionary is useful yet?
    I think that result dataset taken the fields datatype from table directly.

    I'll wait a answer

    Thanks

    "Alexander Kramnik (Digital Metaphors)"
  • edited May 2002
    When the SQL is manually edited all the DADE tools become useless. So the
    answer to your question is no, the data dictionary is not useful if you plan
    on editing the SQL manually.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited May 2002
    Thus, all the fields come of the table, and if the table have a decimal
    field its become in string field size 2.
    If the data type in table is integer then the field remains normal.
    Why the decimal fields becomes in string fields?


    "Alexander Kramnik (Digital Metaphors)"
  • edited May 2002
    When you edit SQL as text in DADE, the data dictionary is not used when
    determining data types. Instead, the query is submitted to the database (in
    this case IB 6) and the data types of the resulting TDataSet are checked. It
    must be that Interbase is converting these fields to string for some reason
    or that some new data type is being returned which is not anticipated by RB.

    In order to determine what is really going on - copy the SQL statement from
    DADE into a TIBQuery and make the query active. Double click the query
    component and add all fields. Select the field in question and see what data
    type is shown in the Object Inspector. This will tell us whether the data
    type is a string, or if RB is simply missing on the conversion of an
    unexpected data type...

    Cheers,

    Tom Ollar
    Digital Metaphors Corporation
  • edited May 2002
    I did it and field datatype show is ftBCD, then I think is correct.
    Maybe RB really missing on the conversion of an unexpected data type, what
    you thing?
    I'm using dbexpress and the field is decimal (12,3)



  • edited May 2002
    Actually there is a known issue with BCD fields and a patch is available to
    address this. Please email support@digital-metaphors.com to request it.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.