Page 1 of 1

Problem with types of Stored Proc parameters (ftBCD instead of ftFmtBCD)

Posted: Tue 26 Dec 2006 14:32
by alexer
Definition in ORACLE:

create or replace procedure X (
SUMMA number) as ....

Code in Delphi7

sp.storedprocname:='X';

Problem:

Driver create param SUMMA with type ftBCD but I wanted ftFmtBCD!!!

I assign
sp.parambyname('X').text := 25.1234323
but ORACLE code receive rounded value: 25.1234

Please help me.

PS. Type ftBCD in Delphi is equal to type money (number(22,4)). To represent values of type number(22,7) we have to use ftFmtBCD type.

Posted: Wed 27 Dec 2006 16:20
by Challenger
The value is truncated by dbExpress, not by the driver. To avoid this situation try to set the value in the following way

Code: Select all

sp.parambyname('X').AsFmtBcd := StrToBcd('25.1234323');
Or set EnableBcd option to false and use float parameters.