Page 1 of 1
Commands out of sync
Posted: Wed 23 Mar 2016 10:59
by marc_3
Hello,
I try to work with a stored procedure, but I have the following error message:
Commands out of sync, you can't run this command now.
I saw in the net that it is a problem on mysql side, is it right??
Separetly the procedure works well.
Thanks for helping
Re: Commands out of sync
Posted: Wed 30 Mar 2016 12:01
by marc_3
Hello
I come back again with another question related to the Problem.
Is it possible to call mysql_free_result() with Unidac?
By MySQL it is said that the fault could come in this situation.
See MySQL 5.7 Reference Manual.
Manuel's citation :
This can happen, for example, if you are using mysql_use_result() and try to execute a new query before you have called mysql_free_result(). It can also happen if you try to execute two queries that return data without calling mysql_use_result() or mysql_store_result() in between.
Re: Commands out of sync
Posted: Wed 30 Mar 2016 12:38
by ViktorV
This error may occur in case if your stored procedure returns more than one recordset and the TUniStoredProc.FetchAll property is set to False. In such case, to solve the issue, try to set the FetchAll property to True. If your TUniStoredProc.FetchAll property is set to True and the error is reproduced, then, please, compose a small sample to demonstrate the issue and send it to viktorv*devart*com, including a script to create database objects.