Joost van der Sluis wrote:
On Mon, 2005-08-01 at 16:03 -0600, Luis Francisco Araya wrote:
Joost van der Sluis wrote:
I have some trouble working with numeric or decimal data types. When I
query fields of this type I only get
the integer part (units before the point) and this is a problem because
I need to work with percentage.
I read on a Interbase tutorial this datatype are store as Integer,
shorint, etc. and applications that "read" fields
of this datatype will read them as this. What they recommend is to set
the precision to some value over 10, but
this does not work.
I'm Using the SqlDB components and (DBGrids and normal EditBox)
If there are less then 5 places behind the decimal, SqlDB should convert
those values to TCurrency. Can you send me the 'create table' script for
the values for which it doesn't work?
This is the first script...
*CREATE* *TABLE* "RECURSOS_ACTIVIDAD"
(
"FK_COD_ACTIVIDAD" INTEGER,
"FK_COD_RECURSO" INTEGER,
"RENDIMIENTO" NUMERIC(12, 6) *DEFAULT* 0.000000 *NOT* *NULL*,
"DESPERDICIO" NUMERIC(12, 6) *DEFAULT* 0.000000 *NOT* *NULL*
);
This are the changes and now is working... I have to format the output
on Lazarus
*CREATE* *TABLE* "RECURSOS_ACTIVIDAD"
(
"FK_COD_ACTIVIDAD" INTEGER,
"FK_COD_RECURSO" INTEGER,
"RENDIMIENTO" FLOAT *DEFAULT* 0.000000 *NOT* *NULL*,
"DESPERDICIO" FLOAT *DEFAULT* 0.000000 *NOT* *NULL*
);
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives