"Commands out of sync" error

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Zvor
Posts: 7
Joined: Sun 26 Oct 2014 15:07

"Commands out of sync" error

Post by Zvor » Wed 09 Mar 2016 14:14

Hello!
Read all accociated posts but didn't found answer - what should i do to correctly handle that Mysql exception?
I've got 1 UniConnection and 1 UniStoredProc components in my app.
I'm using stored procedures very often, by one at the time, no multythreading.
I do smth like

Code: Select all

   sp.Close;
   sp.StoredProcName:='Proc_User_Connect';
   sp.PrepareSQL;
   sp.ParamByName('ParamLogin').AsString := UserName;
   sp.ParamByName('ParamShopName').AsString := ShopName;
   sp.ParamByName('ParamRank').AsInteger := 5;
   sp.ParamByName('ParamDeviceID').AsString := DeviceID;
   sp.Open;
and get lots of tables couse i'm using multiple SELECT statements. And everything is fine till i change smth in my database and one of SELECT statements become wrong. After that i got "Commands out of sync" error and the only way to solve it is to restart an application.
Is there some way to handle that error?
Thanks.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: "Commands out of sync" error

Post by ViktorV » Wed 09 Mar 2016 15:44

There are many possible reasons for this error. Please describe the issue in more details or try to compose a small sample demonstrating the issue and send it to viktorv*devart*com, including scripts for creating database objects.

Post Reply