Number out of range

Number out of range

Postby soria.juan » Wed 27 Sep 2006 20:12

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
soria.juan
 
Posts: 2
Joined: Wed 27 Sep 2006 18:57

Postby Challenger » Thu 28 Sep 2006 12:09

Please send to DbxOda support address complete sample that demonstrates this problem and include script to create server objects.
Challenger
Devart Team
 
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Sample of random error

Postby soria.juan » Thu 28 Sep 2006 13:29

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
soria.juan
 
Posts: 2
Joined: Wed 27 Sep 2006 18:57

Postby Challenger » Fri 06 Oct 2006 13:30

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.
Challenger
Devart Team
 
Posts: 925
Joined: Thu 17 Nov 2005 10:53


Return to dbExpress driver for Oracle