Tokyo: Simultaneous use of stored procedure on MariaDB database fails with "Commands out of sync". No problem on Berlin.


Why is the following code working flawlessly in Delphi 10.1 Berlin, while '' fails in 10.2.1 Tokyo with an error "Commands out of sync; you can't run this command now'. I need similar code in a real program eg. showing records in a dbgrid and in a separate process printing these records on a report.

Database MariaDB 10.1 (but also 10.2).

  lblInfo.Caption:= 'Started, but not finished';
  fdconnection1.Connected:= True;;;
  lblInfo.Caption:= 'Started and correctly finished !!';

Fdquery1 and fdquery2 both uses the same connection FDConnection1.

Both queries calls the same stored procedure.

object FDConnection1: TFDConnection
    Params.Strings = (

  object FDQuery1: TFDQuery
    Connection = FDConnection1
    SQL.Strings = (
      'call db.Test')

stored procedure test:
select from patient;

Note: Solutions like setting FetchOptions.Mode:= fmAll are due to performance issues not practical

Note: On different connections it works

Responses (0)
  • There are no replies here yet.
Your Reply

Please login to post a reply