Consultor Eletrônico



Kbase P106465: The decimal data is being truncated to a whole number when inserting data to the SQL Server database
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/15/2005
Status: Unverified

SYMPTOM(s):

The decimal data is being truncated to a whole number when inserting data to the SQL Server database

The SQL Server column/field has two decimal precision

The schema holder has the following for the field:

ADD FIELD "Field_Name" OF "Table_Name" AS decimal
FORMAT "->>>>>>>>>>>>>>>>9"
INITIAL ?
POSITION 17
DECIMALS 0
ORDER 5200
FOREIGN-POS 20
FOREIGN-NAME "Field_Name"
FOREIGN-TYPE "DECIMAL"
DSRVR-PRECISION 18
DSRVR-SCALE 2
DSRVR-LENGTH 18
DSRVR-FLDMISC 10
FIELD-MISC22 "Y"
MISC-PROPERTIES ""

The schema holder is created by pulling the table definitions SQL Server Database

Performing the Update/Add table definition did not correct the problem

CAUSE:

The decimal value is zero and the position also is wrong. This can happen when the field's format is manually modified after the schema holder is created.

FIX:

There are two workarounds:

1. Delete the table in the schema holder and perform Update/add table definition in the Data Administration > DataServer > MS SQL Server Utilities > Update/Add Table Definitions... to re-pull the table back to the schema holder

OR

2. Modify the field's format in the Data Dictionary to reflect the correct positions and the decimal precision.