Board index » delphi » Problem with field types in Oracle (float recognized as BCD)

Problem with field types in Oracle (float recognized as BCD)

I have a problem with the field types in Oracle 8 and Oracle
dbExpress driver in Delphi 6. Float fields in Oracle are
recognized as BCD (not as Floats) which causes some problems.

Any ideas how to avoid this?

Thanks,
Guido

 

Re:Problem with field types in Oracle (float recognized as BCD)


You should either:
1) Adjust to that
2) Use dbExpress Plus
3) Implement your own data type mapping to float, integer, etc

Regards,
Dmitry

===========================================
Dmitry L. Arefiev, director of gs-soft.ru ltd.
Solutions for successful companies

Author of NCOCI8 - Freeware Delphi to Oracle8i direct access

ICQ: 50741007
EMail: daref...@gs-soft.ru
Company: http://www.gs-soft.ru
NCOCI8: http://www.da-soft.com

Quote
"Guido Vornholt" <guido.vornh...@degussa.com> wrote in message

news:3eafd17e$1@newsgroups.borland.com...
Quote

> I have a problem with the field types in Oracle 8 and Oracle
> dbExpress driver in Delphi 6. Float fields in Oracle are
> recognized as BCD (not as Floats) which causes some problems.

> Any ideas how to avoid this?

> Thanks,
> Guido

Re:Problem with field types in Oracle (float recognized as BCD)


I have heard from my collegue that the field type in Oracle
is not float, but "double precision". It should not make any
difference, should it?

1) What exactly do you mean? It is a bigger application and I
think we cannot adjust the application to the different data
type.
2) What is this? A (third party or Borland) component?
Where can I get it?
3) What do you mean? How?

Thanks a lot!
Guido

Quote
>You should either:
>1) Adjust to that
>2) Use dbExpress Plus
>3) Implement your own data type mapping to float, integer, etc
>> I have a problem with the field types in Oracle 8 and Oracle
>> dbExpress driver in Delphi 6. Float fields in Oracle are
>> recognized as BCD (not as Floats) which causes some problems.

Re:Problem with field types in Oracle (float recognized as BCD)


Quote
Guido Vornholt wrote:
> I have heard from my collegue that the field type in Oracle
> is not float, but "double precision". It should not make any
> difference, should it?

> 1) What exactly do you mean? It is a bigger application and I
> think we cannot adjust the application to the different data
> type.
> 2) What is this? A (third party or Borland) component?
> Where can I get it?

It extends the capabilities of the dbExpress Framework.
One of the design expectations with dbExpress was to sync all
data types to compatible data types so you could use the same
TFields with any driver / database type.  The ones that cause
the biggest problems are numbers.  The spec was written that
14,4 would be mapped to BCD and everything larger (precision
or scale)  would be mapped to FmtBCD.  It is very easy
to map everything to FmtBCD with dbExpress or you can
format to Float, Integer.  If you plan on doing multiple
databases, I would recommend FmtBCD.  If you are only
doing Oracle, then do what you want.

http://sourceforge.net/projects/dbexpressplus

Quote
> 3) What do you mean? How?

> Thanks a lot!
> Guido

>>You should either:
>>1) Adjust to that
>>2) Use dbExpress Plus
>>3) Implement your own data type mapping to float, integer, etc

>>>I have a problem with the field types in Oracle 8 and Oracle
>>>dbExpress driver in Delphi 6. Float fields in Oracle are
>>>recognized as BCD (not as Floats) which causes some problems.

--
Thomas Miller
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork

http://www.bss-software.com
http://sourceforge.net/projects/dbexpressplus

Other Threads