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

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
alexer
Posts: 29
Joined: Tue 26 Dec 2006 14:07

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

Post by alexer » Tue 26 Dec 2006 14:32

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.

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Wed 27 Dec 2006 16:20

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.

Post Reply