Re: [MSEide-MSEgui-talk] Field Mapping
Hello mohamed, you wrote on Sat, 9 Nov 2019 15:51:05 +: > Many thanks for your answer . In fact , the fields decimal(x,y) > or numeric (x,y) must have a x>8 . After the changes field.type is > ftbcd and it's that what I expected . You know that using BCD (Binary Coded Decimal) is a rather old and inefficient representation, but it's still used quite often for commercial software and probably databases in this environment. As that's an integer-like representation also, it suffers no precision loss within its validity range as would any floating point representation. So for money people, floating point is a no-go in every respect. 64 bit integers should suffice for some time to come anyway. > TMSEIBCONNECTION instead tfb3connection resolves the problem also, but > is it safe to use it with Firebird 3 server? No, I don't (didn't) know that, but as I'm not deeply involved with databases, I had no need for such things yet. But it is good to know anyway, so many thanks for your information! -- -- (Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem) --- Mit freundlichen Grüßen, S. Schicktanz --- ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Field Mapping
Hi Sieghard, Many thanks for your answer . In fact , the fields decimal(x,y) or numeric (x,y) must have a x>8 . After the changes field.type is ftbcd and it's that what I expected . You know that using TMSEIBCONNECTION instead tfb3connection resolves the problem also, but is it safe to use it with Firebird 3 server? Med. De : Sieghard Envoyé : vendredi 8 novembre 2019 22:18 À : mseide-msegui-talk@lists.sourceforge.net Objet : Re: [MSEide-MSEgui-talk] Field Mapping Hello mohamed, you wrote on Tue, 5 Nov 2019 18:54:38 +: > Firebird field NUMERIC(8,2) is mapped automatically as integer in > MSEGUI? What is the correct mapping 8.2 looks somewhat like a currency designation, a 10 digit real value with 2 decimal places. Scaled by 100 it fits comfortably into a 32 bit integer value without any loss of precision, as a 32 bit "single" would suffer from. Maybe the fpc "currency" type might do? This is an integer type (64 bit), that's internally mapped to represent a number scaled by 1/1, which amounts to 4 decimal places and around 15 integer digits, i.e. 19 valid digits altogether. A bit of overkill, but this type is "natively" supported by fpc, when you would have to create a full set of operators yourself if you wanted to use a specifically taylored type of your own. > I am using FB3 connection. Isn't such a declaration usually a parametrized type? I.e, you could just as well declare a field type being NUMERIC(12.3) oder NUMERIC(5.1), or any other fixed point size? Fixed point means a constant-power-of-10 scaling as specified by the number of decimal places. This can easily be represented by an integer of sufficient size, requiring only a simple transformation for retrieval, storing and multiplication type operations, as well as for external representation (displaying or printing). I hope this can be of some help. -- -- (Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem) --- Mit freundlichen Grüßen, S. Schicktanz --- ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Field Mapping
Hello mohamed, you wrote on Tue, 5 Nov 2019 18:54:38 +: > Firebird field NUMERIC(8,2) is mapped automatically as integer in > MSEGUI? What is the correct mapping 8.2 looks somewhat like a currency designation, a 10 digit real value with 2 decimal places. Scaled by 100 it fits comfortably into a 32 bit integer value without any loss of precision, as a 32 bit "single" would suffer from. Maybe the fpc "currency" type might do? This is an integer type (64 bit), that's internally mapped to represent a number scaled by 1/1, which amounts to 4 decimal places and around 15 integer digits, i.e. 19 valid digits altogether. A bit of overkill, but this type is "natively" supported by fpc, when you would have to create a full set of operators yourself if you wanted to use a specifically taylored type of your own. > I am using FB3 connection. Isn't such a declaration usually a parametrized type? I.e, you could just as well declare a field type being NUMERIC(12.3) oder NUMERIC(5.1), or any other fixed point size? Fixed point means a constant-power-of-10 scaling as specified by the number of decimal places. This can easily be represented by an integer of sufficient size, requiring only a simple transformation for retrieval, storing and multiplication type operations, as well as for external representation (displaying or printing). I hope this can be of some help. -- -- (Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem) --- Mit freundlichen Grüßen, S. Schicktanz --- ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Field Mapping
Hello Med. I would be glad to help you but it was long time ago when I worked with FB3 and I cannot find time to re-jump into that. I hope somebody else will help you. Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
[MSEide-MSEgui-talk] Field Mapping
Hi All, Firebird field NUMERIC(8,2) is mapped automatically as integer in MSEGUI? What is the correct mapping I am using FB3 connection. Help will be appreciate Med. ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk