RES: [firebase-br] Numeric(18,8) x TFmtbcdField

Rubem Rocha rrocha em fpf.br
Seg Nov 22 21:26:19 -03 2004


É verdade. Tem razão!
[]s

-----Mensagem original-----
De: lista-bounces em firebase.com.br [mailto:lista-bounces em firebase.com.br] Em nome de douglas
Enviada em: segunda-feira, 22 de novembro de 2004 20:19
Para: FireBase
Assunto: Re: [firebase-br] Numeric(18,8) x TFmtbcdField


vejam o manual do Delphi 7
fala que o TBCDField tem limite de 4 casa decimais e o TFMTBCDField não, porem é mais lento. vejam o texto entre *** / ***

TBCDField encapsulates the fundamental behavior common to binary-coded decimal (BCD) fields. BCD values provide greater precision and accuracy than floating-point numbers. BCD fields are often used for storing and manipulating monetary values.

The IDE uses two different field types for representing BCD fields: TBCDField and TFMTBCDField. TBCDField uses the Currency (Delphi) or System::Currency (C++) type to manipulate BCD values. This is faster than storing and manipulating the value using a true BCD type, but limits the precision of the BCD values it can support to 4 decimal places and 20 significant digits.

TBCDField converts the data from a BCD value to a Currency value when it fetches the data from the database table, and converts it from a Currency value to a binary-coded decimal value when it posts the data. If the underlying database table contains a value that requires greater precision, TBCDField raises an exception. *** If your application requires BCD values with more than 4 decimal places or 20 significant digits, you should use TFMTBCDField instead. TFMTBCDField is a true BCD, with the precision of the binary-coded decimal type (TBCD) but with somewhat slower performance. ***

If you use the Fields editor at design time to create a persistent field component for the BCD field, you can access it by name at runtime. When using dynamic field components, you can access the TBCDField instance using the dataset's Fields property or FieldByName method.

[]s

Douglas


----- Original Message -----
From: "Rubem Rocha" <rrocha em fpf.br>
To: "FireBase" <lista em firebase.com.br>
Sent: Monday, November 22, 2004 7:12 PM
Subject: RES: [firebase-br] Numeric(18,8) x TFmtbcdField


Só redefinindo o campo para float no banco. Todo e qualquer campo mapeado pra TFMTBCDField sempre trabalhará com precisão máxima fixa de 4 casas decimais. Não tem como mudar isso. []s

-----Mensagem original-----
De: lista-bounces em firebase.com.br [mailto:lista-bounces em firebase.com.br] Em nome de Renato Braun Enviada em: segunda-feira, 22 de novembro de 2004 15:48
Para: lista em firebase.com.br
Assunto: [firebase-br] Numeric(18,8) x TFmtbcdField


Olá pessoal,

    Tenho um campo do tipo Numeric(18,8) no Firebird 1.5 e qdo eu "importo" ele no Delphi 7 (DBxpress) ele vem como TFMTBCDField e este só trabalha com 4 casas decimais.

    Existe alguma forma de resolver este problema ??

Obrigado e sucesso a todos





---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.797 / Virus Database: 541 - Release Date: 15/11/2004



______________________________________________
FireBase-BR (www.firebase.com.br) - Hospedado em www.bavs.com.br Para editar sua configuração na lista, use o endereço http://mail.firebase.com.br/mailman/listinfo/lista_firebase.com.br


______________________________________________
FireBase-BR (www.firebase.com.br) - Hospedado em www.bavs.com.br Para editar sua configuração na lista, use o endereço http://mail.firebase.com.br/mailman/listinfo/lista_firebase.com.br

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.797 / Virus Database: 541 - Release Date: 15/11/2004
 




Mais detalhes sobre a lista de discussão lista