DOA 4.0.3, Delphi 7, Oracle 9.2.0.4 standard edition, Win2K sp4.
I have a TQuery with an SQL property like this (very simple):
UPDATE CONTROP
SET field1 = :var1,
field2 = :var2,
field3 = 'S',
field4 = :var3
WHERE condition
CONTROP is a synonym for a table accessed via a valid dblink (on the same db server).
Field4 is a date type field and so is var3 (date type variable).
On the Execute, I get the error ORA-24370: "Illegal piecewise operation attempted".
The same TQuery on the same table not via dblink works fine.
The same query in SQLPlus works fine, even using the dblink!
The date var3 is correctly set; I used TQuery debug property and Oracle monitor to check out this.
If I delete field3 from the above statement, it works.
If I set field3 as TO_DATE('30-NOV-2003') in the TQuery SQL property (thus I don't use variables), it works!
If I try to use all parameters as strings, it doesn't work!
Even more incredible (if possible), if you put field4 = :var3 before the field3 = 'S' row in the SET clause above, it works!!
Both the databases have the same settings.
The error arises systematically with the conditions explained above.
I'm really in the darkness!! Any idea?
Thank you in advance.
Massimo Clot
S.H.G. srl
I have a TQuery with an SQL property like this (very simple):
UPDATE CONTROP
SET field1 = :var1,
field2 = :var2,
field3 = 'S',
field4 = :var3
WHERE condition
CONTROP is a synonym for a table accessed via a valid dblink (on the same db server).
Field4 is a date type field and so is var3 (date type variable).
On the Execute, I get the error ORA-24370: "Illegal piecewise operation attempted".
The same TQuery on the same table not via dblink works fine.
The same query in SQLPlus works fine, even using the dblink!
The date var3 is correctly set; I used TQuery debug property and Oracle monitor to check out this.
If I delete field3 from the above statement, it works.
If I set field3 as TO_DATE('30-NOV-2003') in the TQuery SQL property (thus I don't use variables), it works!
If I try to use all parameters as strings, it doesn't work!

Both the databases have the same settings.
The error arises systematically with the conditions explained above.

Thank you in advance.
Massimo Clot
S.H.G. srl