Answer the question
In order to leave comments, you need to log in
Do transactions affect the execution of prepared queries?
The correctness of the request will be affected if it will be prepared in one transaction, and will be called in another.
Schematically like this:
sql = 'UPDATE customer SET field = :field WHERE id = :id';
query.SQL = sql;
query.Prepare;
// выполняем блок ниже в цикле по массиву переданных ИДов
for ...
startTransaction();
try
...
query.Param['id'] = ...
query.Param['field'] = ...
query.Exec();
commitTransaction();
except
rollbackTransaction();
raise;
end;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question