0

Delphi XE2 + Zeos 7.0.3 Stable + Firebird 1.0

I am porting an old app from Delphi 5 + IBX and got this problem:

I have a table that one for the fields is auto calculated:

NUMERIC(18,2)
COMPUTED BY (( (VAL_ITENS + 
                VAL_SERVICO + 
                TAXAENTRADA + 
                VAL_COUVERT + 
                VAL_ESTACION + 
                VAL_CONSUM + 
                VAL_TAXA-DESCONTO_V) - ((VAL_ITENS*DESCONTO_P)/100)))

On IBX it is calculated fine. On ZeosLib it does not get calculated. Using the same database file and server.

Is there a way to force this calculation to happen? I have tried to update the field by program, however it is read only.

ANSWER: I had some problems with Zeos and Firebird, so I was thinking ALL the problems were related to Zeos, and this is not the case, the problem is that one of the fields were NULL and the result was getting calculated as NULL.

Eduardo Elias
  • 1,742
  • 1
  • 22
  • 49
  • Zeos 7 stable ? Well.... i would not believe that. And FB 1.0 is ancient and hardly stable as well. I think you better for ZeosDB forums for thsi particular issue, and there do not hide the request you make nor the settings of the TDataSet component used. As an experiment, try modern FB 2.5.2 on that database and request. Perhaps ZeosDB has problem with deprecated legacy Interbase APIs ? – Arioch 'The Jun 14 '13 at 15:42
  • 1
    *On ZeosLib it does not get calculated* what exactly that was supposed to mean ? this field does not exists ? does contain NULL ? does contain garbage ? raises Exception when reading ? Just WHAT DOES GO WRONG ? Maybe your request actually calculate thsoe fields to NULL? http://www.catb.org/esr/faqs/smart-questions.html#beprecise BTW Calculation is done on-server, what IBX or ZDB can do 0 is read value from server. Looks like ZDB does not read it, but the calculation itself goes fine - on server. – Arioch 'The Jun 14 '13 at 15:46
  • @Arioch'The Yes it is ancient, but it is a legacy system that I cannot ask to upgrade to any other thing. I have to make it work. I meant not getting calculated that the value of the field remains "null". On the other app using IBX, delphi 5 and the same Firebird server it makes the calculation and stores the value correctly always – Eduardo Elias Jun 14 '13 at 16:02
  • Switch lib. I would not trust ZeOS 7 anyway. Give a try to UIB if you iek to be low-weight and close to metal, or to FIB+ if you like to be wrapped in many layers of features, or... welll, why not IBX ? IBX + fbutils extending libs. Your XE2 does include IBX, doesn't it ? – Arioch 'The Jun 14 '13 at 20:11
  • 1
    And perhaps try to carefully intercept and debug requests passing. Maybe your columns really evaluate to NULL ? 9 columns in the formula - any of them NULL make the whole expression null! Mmm... do you fave other num(18,2) fields in there ? – Arioch 'The Jun 14 '13 at 20:13

0 Answers0