Commands out of sync; you can't run this command now
来源:互联网 发布:python nginx日志分析 编辑:程序博客网 时间:2024/06/10 17:49
C mysql (C API Commands out of sync; you can't run this command now)
错误出现在当一个用户使用查询,另一个用户再使用此sql连接进行查询的时候;
原因是因为上一次使用此sql连接进行查询时没有将所有的结果集给释放掉,在所有使用此sql连接进行查询的地方将所有的结果集给释放掉,正确的做法如下
MYSQL_RES *result_ptr = mysql_store_result(tpSqlConn); if (result_ptr) { MYSQL_ROW row = mysql_fetch_row(result_ptr); if (row) { rtn_str = row[0]; } mysql_free_result(result_ptr); // 释放当前查询的所有结果集. 否则下次查询将会出错. while (!mysql_next_result(tpSqlConn)) { result_ptr = mysql_store_result(tpSqlConn); mysql_free_result(result_ptr); } }
阅读全文
0 0
- 解决error:2014 Commands out of sync; you can't run this command now
- 如何解决mysql 中出现Commands out of sync; you can't run this command now
- Commands out of sync; you can't run this command now
- 解决error:2014 Commands out of sync; you can't run this command now
- Commands out of sync; you can't run this command now错误
- python mysql 2014 Commands out of sync; you can't run this command now
- 解决error:2014 Commands out of sync; you can't run this command now
- error:2014 Commands out of sync; you can't run this command now
- LR错误: Commands out of sync; you can't run this command now 解决方法
- 解决mysql error:2014 Commands out of sync; you can't run this command now
- ERROR (ProgrammingError) (2014, "Commands out of sync; you can't run this command now")
- Commands out of sync; you can't run this command now
- mysql: Commands out of sync; you can't run this command now
- python Commands out of sync; you can't run this command now
- mysql 出现 Commands out of sync; you can't run this command now
- Commands out of sync; you can't run this command now?
- Commands out of sync; you can't run this command now SQL
- Commands out of sync; you can't run this command now
- 数据结构 查找 散列表(Hash)(1)
- (浅谈)Java反射机制的使用
- leetCode-Remove Duplicates from Sorted Array II
- 使用 CSS 去掉 iPhone 网页上按钮的超大圆角以及文本框圆角默认样式
- EOJ 2536 求和
- Commands out of sync; you can't run this command now
- 参考
- java设计模式----创建型
- python学习三--列表
- Pytorch Transfer learning
- 计算圆的面积和周长
- Java性能优化入门
- csdn markdown编辑器使用说明
- shell脚本---字符串操作