79381621

Date: 2025-01-23 15:23:13
Score: 1
Natty:
Report link

I discovered the issue. Even though the error was happening on this line, it was caused higher up in the code in a section not in the example:

...
QBatch.Open;
QGetLastBatchNumber.Open;
...

These were two TUniQueries that both accessed the same table called BATCH with different sql statements. So the error was actually that I was trying to make two connections to the same table in a transaction. I do not know why this wasn't an issue before Delphi 12.2 and I do not know exactly why the error triggered on QBatch.Post as opposed to when I opened both tables, but if you have a similar error, you can look to see if you have two different TUniQueries open that connect to the same table within a single transaction.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): have a similar error
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: dallin