Mysql using mym - "Commands out of sync" error

3 Ansichten (letzte 30 Tage)
Eran Mukamel
Eran Mukamel am 20 Jan. 2012
Hi All, I'm using mym to extract data from a mysql database. The first SELECT query I send works just fine, but subsequently I get an error:
Error using mym
Commands out of sync; you can't run this command now
If I re-open the database (i.e. run mym('open',...); mym('use',...')) then everything works again, but this costs significant extra time. Any advice would be greatly appreciated.
Eran Mukamel emukamel@ucsd.edu
  1 Kommentar
Sandy
Sandy am 10 Jul. 2013
I had the same error, and I figured it out, but I don't really understand what I did. In the source file mym.cpp, find this: "if (!mysql_real_connect(conn, host, user, pass, NULL, port, NULL, CLIENT_MULTI_STATEMENTS))", and change CLIENT_MULTI_STATEMENTS to CLIENT_MULTI_RESULTS. This works for me, but I am not sure whether there will be other problems.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by