Am 16.12.2022 um 08:50 schrieb Michael Van Canneyt via fpc-pascal:
ApplyUpdates as you use it, is not the correct solution.
Once more: ApplyUpdates ONLY makes sense after changing data and doing a
Post. Any other use does not make any sense.

Data is changed by the SP. But this is done in a simpy open in the
query. No insert or delete of the Query is activated. It must be done
with open, because a resultset is returned. This can not be handled by
ExecSQL (maybe ia wrong).

"after changing data" must be understood as 'you change data in the
dataset', i.e. a post or delete operation on the dataset.

TDataset cannot know what happens behind the scenes in a stored procedure.
But it opens a transaction without close it.
If i look before fire the open, the transaction is inactive, after the
open it is active and after the close it is still active.

This is not expected by me. The query creates a 'dangling' transaction.

Since you are not doing a Post(), ApplyUpdates does not apply, nor does
sqoAutoCommit. Both are relevant only afer a Post()  or Delete.

I will add some remarks to the documentation to make this more clear.
Thanks,
now it will be more clear.

But will it be better to add a TStoredProcedure to the SQLdb Components
as other componentsset do. This can better fullfill the special
requirements of Stored Procedures and Functions.

I know the work, but if "someone" make it, will it be accepted ? And yes
i know the freeTDS components have (some) limitation specially with SP
and returnvalues.


Michael.

_______________________________________________
fpc-pascal maillist  -  
fpc-pascal-pd4fty7x32k2wbthl531ywd2fqjk+...@public.gmane.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to