Board index » delphi » Delphi 4 creates wrong field type

Delphi 4 creates wrong field type

This is the sql definition of the table I am working with.
MoneyVal is a Numeric(15,2) domain,

CREATE TABLE LATECHARGE (
 LCNUMBER IDVAL NOT NULL,
        LCDESC VARCHAR(40) DEFAULT " " NOT NULL,
        DAYSPASTDUE SMALLINT DEFAULT 0 NOT NULL,
        METHOD CHAR(1) DEFAULT " " NOT NULL,
        MINAMT MONEYVAL DEFAULT 0 NOT NULL,
        MAXAMT MONEYVAL DEFAULT 0 NOT NULL,
        FLATAMT MONEYVAL DEFAULT 0 NOT NULL,
        RATE NUMERIC(9, 3) DEFAULT 0 NOT NULL,
CONSTRAINT PLCNUMBER PRIMARY KEY (LCNUMBER));

What happens is, when you create a table in delphi, open the fields editor,
add all fields, BAM... the Rate field shows up as an integer, and there is
no way to make it a float... I have drop the table and added it back, but it
doesn't help. I really need this field to show up as a Float.

Is this a bug, is there a work around? Any help is greatly appreciated

 

Re:Delphi 4 creates wrong field type


Quote
>What happens is, when you create a table in delphi, open the fields editor,
>add all fields, BAM... the Rate field shows up as an integer, and there is
>no way to make it a float... I have drop the table and added it back, but it
>doesn't help. I really need this field to show up as a Float.

>Is this a bug,

No just bad programming.   When you create a table with out specifying the type
you get a Paradox table.  Since Paradox doesn't have a number field type that
supports a specific number of decimal digits your getting a default number field
type.
If you want a float field then specify a float field.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads