Simple select from TOracleDataSet causes ORA-01722:invalid number

MMI

Member
I have TOracleDataSet which has sql:
SQL[0] = 'select * from ad.VIEW_MT_SUB_VIEW'
SQL[1] = 'where numurs = 'xxx''
field numurs is of type varchar2(7)
in application i replace SQL[1] as needed.

usually all works fine.

but now if SQL[1] := ' where numurs = ''9453252''' then opening DataSet i get Ora-01722:invalid number error.
in PL/SQL i get "no rows selected" instead of Ora-01722.
so i assume that either DOA has some bug here or something else...

my setup: w2k/sp3/delphi5 with D5EntUpdate.exe applied and DOA 3.4.6.4

[This message has been edited by MMI (edited 07 March 2003).]
 
I can only imagine that this statement fails if the number 9453252 is not included in quotes.

This succeeds (no rows returned):

select * from dept where dname = '10'

This fails with ORA-01722:

select * from dept where dname = 10

I don't see any other numbers in your SQL...

------------------
Marco Kalter
Allround Automations
 
no... that's the problem - quotes are all the time - otherwise it wouldn't work at all.

form shows detailed information about case - you enter number of case - and you see details... all other numbers(as far as i know) work well. this one - doesn't, that's why i can't understand what is happening.

may be i need to get some additional information for further research?
 
Perhaps you can use the Oracle Monitor to investigate this? It will show the exact statement that was executed and the variable values.

------------------
Marco Kalter
Allround Automations
 
Back
Top