IDASQLCommand Question

Hi,

I’ve old project in delphi 2010, DA 9.4.107.1363. DB: MsSql 2005 Express.

2022-08-10_11h03_40

I’ve procedure that will execute the update statement by IDASQLCommand in following order:

  1. update value_tbl SET VALUE = 300 WHERE id= 2
  2. update value_tbl SET VALUE = 600 WHERE VALUE = 200

I suppose the ID =2 row value is 300 as in the first statement already changed the value to 300.

However, I get the final result is ID=2 row, it change to 600 instead of 300.
I need commit the transaction first or any else to make the result exactly as my execution order.

Any suggestion on this case?

joe

Hi,

is it possible to use SQL Profiler and check in logs what is happened?

will try Thanks

Finally Find the reason. Because of the SendReducedDelta set to true. The moment get the record value if in between someone change the row value. Even I assign value to that field but the SendReducedDelta treat as no change so skip my updated value. As a result, I did not expect that field value not updated.

I solved it already and not related to the sql sequence.

joe

1 Like