[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

Error when selecting on real value throug AOS

Dag Matland

2/3/2006 12:58:00 PM

Hi, we have a strange problem, and have simplified it here:

We are running the following code:

static void Job10(Args _args)
{
j1objek j1;
;

select j1 where j1.j1idkon == '18' && j1.j1idnum == 1;
}

This code returns the errormessage:
ora-01722: invalid number

j1idnum is defined as real in axapta, and number(32,16) in the oracle
database.

When tracing this code from oracle, we get the following;

PARSING IN CURSOR #1 len=485 dep=0 uid=2891 oct=3 lid=2891 tim=48299792806
hv=2432910500 ad='203b47a0'
SELECT /*+ INDEX(A I_40091J1INX01) FIRST_ROWS
*/A.J1TYPE,A.J1IDNUM,A.J1IDKON,A.J1LOPEN,A.J1STATU,A.UDATE,
A.TIMESTMP,A.J1KRASE,A.J1SKATO,A.J1SKATP,A.J1EFTAN,A.J1FLAND,A.J1ISNUM,A.J1OLAND,A.J1RKLSL,A.J1VDATO,A.J1TEKST,
A.J1REFNR,A.J1TKODE,A.J1SLKTE,A.MODIFIEDDATE,A.MODIFIEDTIME,A.MODIFIEDBY,A.CREATEDDATE,A.CREATEDTIME,A.CREATEDBY,A.RECID
FROM J1OBJEK A
WHERE ((SUBSTR(NLS_LOWER(DATAAREAID),1,3)=NLS_LOWER(:in1)) AND
((SUBSTR(NLS_LOWER(J1IDKON),1,2)=NLS_LOWER(:in2)) AND (J1IDNUM=:in3)))
END OF STMT
PARSE #1:c=0,e=5240,p=0,cr=16,cu=0,mis=1,r=0,dep=0,og=0,tim=48299792801
BINDS #1:
bind 0: dty=1 mxl=32(03) mal=00 scl=00 pre=00 oacflg=01 oacfl2=10 size=96
offset=0
bfp=11039eef0 bln=32 avl=02 flg=05
value="06"
bind 1: dty=1 mxl=32(02) mal=00 scl=00 pre=00 oacflg=01 oacfl2=10 size=0
offset=32
bfp=11039ef10 bln=32 avl=02 flg=01
value="18"
bind 2: dty=1 mxl=32(32) mal=00 scl=00 pre=00 oacflg=01 oacfl2=10 size=0
offset=64
bfp=11039ef30 bln=32 avl=04 flg=01
value="1.E0"
EXEC #1:c=0,e=243,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=2,tim=48299796363
ERROR #1:err=1722 tim=2227881793

This shows that the value 1 becomes "1.E0", and that explains why we got the
invalid number error.
The problem dissapears when restarting the aos server, but appears again
after a while.

Does anyone know why this is happening, or how to avoid the problem?

We are running axapta 3.0 sp 3 and oracle 9.2.0.7.

Any help would be appreciated.

Regards
Dag Matland