Page 1 of 1

"Commands out of sync" error

Posted: Wed 09 Mar 2016 14:14
by Zvor
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.

Re: "Commands out of sync" error

Posted: Wed 09 Mar 2016 15:44
by ViktorV
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.