Field type mismatch exception at runtime - only when using Direct Connection + NonBlocking mode
Posted: Mon 20 Jun 2016 09:03
Hello
I have a strange problem with TOraQuery
My compiled application behaves different depending on connection mode / usage of NonBlocking mode
I have tried and compiled app both as 32-bit & 64-bit - exception is raised in both of them
Problem happens:
When I change one of things listed above application works fine
When I open "Data Editor" at designtime there is no problem too
SQL sample from Debug window (maybe it could be helpful...)
Exception message:
"Type mismatch for field 'DATA_DO', expecting: DateTime actual: String"
Looks like internal bug...
I'd be really gratefull for any fix...
Regards
P.C.
P.S. I have tested this query in ancient application called "EasySQL" at and this SQL is working fine
I have a strange problem with TOraQuery
My compiled application behaves different depending on connection mode / usage of NonBlocking mode
- OCI - everything is fine
Direct connection - Exception "Type mismatch for field '<FIELD_NAME>', expecting: DateTime actual: String"
I have tried and compiled app both as 32-bit & 64-bit - exception is raised in both of them
Problem happens:
- Only when using session with "Direct" connection mode
Only in runtime
Only when using NonBlocking mode
When I change one of things listed above application works fine
When I open "Data Editor" at designtime there is no problem too
SQL sample from Debug window (maybe it could be helpful...)
Code: Select all
select m.symbol mag_symbol, m.nazwa mag_nazwa, kon.nazwa_wlasna, count(distinct pm.pi_numer) ile_inw,
sum(decode(om.stoo_symbol, 'KI+', om.wart_spz_net, 0)) csn_plus,
sum(decode(om.stoo_symbol, 'KI-', om.wart_spz_net, 0)) csn_minus,
sum(decode(om.stoo_symbol, 'KI+', om.wart_spz_net, 'KI-', -om.wart_spz_net, 0)) csn_saldo,
round
(
sum
(
decode
(
m.typ_magazynu,
'PSD-FRANCZYZA', 0,
decode
(
om.stoo_symbol,
'KI+', 0,
'KI-', 0,
om.wart_spz_net
)
)
)
*k.tresc/100, 2
) dop_straty,
sum
(
decode
(
m.typ_magazynu,
'PSD-FRANCZYZA', 0,
decode
(
om.stoo_symbol,
'KI+', 0,
'KI-', 0,
om.wart_spz_net
)
)
) csn_obrot,
sum(decode(om.stoo_symbol, 'KI+', om.ilosc_jme, 0)) ile_jme_plus,
sum(decode(om.stoo_symbol, 'KI-', om.ilosc_jme, 0)) ile_jme_minus,
mp.ak_podmiot_odp,
decode(m.typ_magazynu, 'PSD-FRANCZYZA', 'T', 'N') czy_franczyza,
sum(decode(om.stoo_symbol, 'KI+', 1, 0)) ile_plus,
sum(decode(om.stoo_symbol, 'KI-', 1, 0)) ile_minus,
:BEGINNING data_od, :ENDING data_do, 'W TOKU' status, 'N' czy_zamkniete,
mp.kon_podmiot_odp
from slw_magazyny m
join
slw_mag_param mp
on (mp.symbol = m.symbol)
join
inw_plan_mag pm
on (pm.m_symbol = m.symbol)
join
mk_operacje_mag om
on (om.m_symbol = m.symbol)
join
mz_konfig k
on (k.param = 'INW_DOP_STRATY_PROC')
join
kon_kontrahent kon
on (kon.numer_kontrahenta = mp.kon_podmiot_odp)
where m.czy_miejscowy = 'N'
and pm.czy_rozl_wart = 'N'
and om.data_oper_mag between :BEGINNING and :ENDING
and (pm.pi_numer, pm.m_symbol) in
(
select distinct om_k.dokument_obcy, om_k.m_symbol
from mk_operacje_mag om_k
where om_k.data_oper_mag between :BEGINNING and :ENDING
and om_k.stoo_symbol in ('KI-', 'KI+')
and om_k.dokument_obcy is not null
)
group by m.symbol, m.nazwa, mp.kon_podmiot_odp, kon.nazwa_wlasna, k.tresc, mp.ak_podmiot_odp, m.typ_magazynu
:BEGINNING(DATE,IN)=2010-01-01
:ENDING(DATE,IN)=2016-03-31
"Type mismatch for field 'DATA_DO', expecting: DateTime actual: String"
Looks like internal bug...
I'd be really gratefull for any fix...
Regards
P.C.
P.S. I have tested this query in ancient application called "EasySQL" at and this SQL is working fine