Avatar of balrom
balrom

asked on 

UPDATE problem with Delphi/DB2/AS400

Hi,
i'm developing an NT service using delphi2006 and ADO to execute an update on DB2/AS400.

I'm using a TADOQuery object and when i try to execute the following query:

UPDATE MYTABLE          
SET FIELD1 = (SELECT FIELD1 FROM MYTABLE WHERE FIELD2 = 'A') + 1
WHERE FIELD2 = 'A'

I get the error code SQL0302, that mean something like "The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use".

Of course the same query executed from other applications like dbvisualizer works fine, without any problem.
Moreover, i'm not using host variables, only fixed values in the SET and WHERE clauses.

My problem is very urgent, any help is welcome..
Regards
Operating SystemsDB2DelphiCOBOL

Avatar of undefined
Last Comment
balrom

8/22/2022 - Mon