Board index » delphi » Float / BCD number using dbExpress->DB2

Float / BCD number using dbExpress->DB2

Select in DB2 command center -> return 12,5 for field SCORE
Select in SQLClientDataset -> return 1250 for field SCORE. The TField
created is TBDCField, I can't use TFloatField.
Why 12,5 in first case and 1250 in second case ?
 

Re:Float / BCD number using dbExpress->DB2


You decimal separator needs to be '.' as BCD translation code doesn't
understand ',' as a decimal separator.

T.Ramesh.
"Guinther de Bitencourt Pauli" <guint...@unifra.br> wrote in message
news:3caca0cf_1@dnews...

Quote
> Select in DB2 command center -> return 12,5 for field SCORE
> Select in SQLClientDataset -> return 1250 for field SCORE. The TField
> created is TBDCField, I can't use TFloatField.
> Why 12,5 in first case and 1250 in second case ?

Re:Float / BCD number using dbExpress->DB2


Yes, now is working. Really, here in Brazil the decimal separator is ","
Thanks Ramesh.

Quote
"Ramesh Theivendran" <rtheivend...@borland.com> wrote in message

news:3cacc859$1_1@dnews...
Quote
> You decimal separator needs to be '.' as BCD translation code doesn't
> understand ',' as a decimal separator.

> T.Ramesh.
> "Guinther de Bitencourt Pauli" <guint...@unifra.br> wrote in message
> news:3caca0cf_1@dnews...
> > Select in DB2 command center -> return 12,5 for field SCORE
> > Select in SQLClientDataset -> return 1250 for field SCORE. The TField
> > created is TBDCField, I can't use TFloatField.
> > Why 12,5 in first case and 1250 in second case ?

Re:Float / BCD number using dbExpress->DB2


Yes, but what can I do if my customer can't change control panel properties
? I try to change this settings manually when the program starts, but
without success. Why BCD translation don't understand ',' as decimal
separator, im my opnion this function need get this paramter from Windows
configuration, and not assume '.' always.
Thanks.

"Ramesh Theivendran" <rtheivend...@borland.com> escreveu na mensagem
news:3cacc859$1_1@dnews...

Quote
> You decimal separator needs to be '.' as BCD translation code doesn't
> understand ',' as a decimal separator.

> T.Ramesh.
> "Guinther de Bitencourt Pauli" <guint...@unifra.br> wrote in message
> news:3caca0cf_1@dnews...
> > Select in DB2 command center -> return 12,5 for field SCORE
> > Select in SQLClientDataset -> return 1250 for field SCORE. The TField
> > created is TBDCField, I can't use TFloatField.
> > Why 12,5 in first case and 1250 in second case ?

Other Threads