Page 1 of 1

Number out of range

Posted: Wed 27 Sep 2006 20:12
by soria.juan
Greetings,

I purchased and i'm using dbExpress Drivers for Oracle V3.0.

When i'm working with numbers and some calculation (with internalCalc Fields) sometimes the error is raised, sometimes not. The weird stuff is that the error message looks like to be random.

The error message is: Number is out of range

I'm using Delphi 6 and DBExpress Drivers for Oracle v3.0

Best Regards,

Juan

Posted: Thu 28 Sep 2006 12:09
by Challenger
Please send to DbxOda support address complete sample that demonstrates this problem and include script to create server objects.

Sample of random error

Posted: Thu 28 Sep 2006 13:29
by soria.juan
Greetings,

The sample performs a simple calculation:

ClntDtStAtualizacaoDebito.FieldByName('IntCalcTotal').AsCurrency :=
CLNTDTSTATUALIZACAODEBITO.FIELDBYNAME('vl_parcela_titulo').ASCURRENCY +
CLNTDTSTATUALIZACAODEBITO.FIELDBYNAME('vl_multa_itematual').ASCURRENCY +
CLNTDTSTATUALIZACAODEBITO.FIELDBYNAME('vl_juras_itematual').ASCURRENCY +
CLNTDTSTATUALIZACAODEBITO.FIELDBYNAME('vl_man_sist_itematual').ASCURRENCY +
CLNTDTSTATUALIZACAODEBITO.FIELDBYNAME('vl_reemissao_tit_itematual').ASCURRENCY +
CLNTDTSTATUALIZACAODEBITO.FIELDBYNAME('vl_entrada_sist_itematual').ASCURRENCY +
CLNTDTSTATUALIZACAODEBITO.FIELDBYNAME('vl_susp_tit_itematual').ASCURRENCY +
CLNTDTSTATUALIZACAODEBITO.FIELDBYNAME('vl_emissao_aviso_itematual').ASCURRENCY +
CLNTDTSTATUALIZACAODEBITO.FIELDBYNAME('vl_lavratura_prot_itematual').ASCURRENCY;

We've already tried to change things like "AsCurrency" to "AsFloat", but the error still remains. It is random, we couldn't determine it's cause or even reproduce it. The same code exposed above, runs fine sometimes while raise exception other times.

First, we've already developed the same ERP system using your DBExpress Drivers for SQLServer v1.7 and now we are migrating from SQLServer to Oracle, using the new purchased DBExpress Drivers for Oracle v3.0.

Is there any specific configuration to be made in these migration process. Maybe for some types? We translated every Integer, Float and Currency values to FMTBCDField or BCDFields.

From there, we really need some advice.

Best regards,

Juan

Posted: Fri 06 Oct 2006 13:30
by Challenger
Using EnableBCD, FloatPrecision, IntegerPrecision, SmallIntPrecision and BCDPrecision options you can tune representation of numeric field types. For more information please refer to ReadMe.html. Try to find the record which causes this error. Send us script that creates your table and fills it with necessary data.