您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

使用mysqlclient执行存储过程报错2014 Commands out of sync; you can't run this command now

bubuko 2022/1/25 20:05:03 mysql 字数 1071 阅读 851 来源 http://www.bubuko.com/infolist-5-1.html

在连续执行存储过程,并且存储过程有返回查询结果时,报错2014 Commands out of sync; you can't run this command now; 参考https://blog.csdn.net/ice4026/article/details/37592715 需要使用cur ...

在连续执行存储过程,并且存储过程有返回查询结果时,报错2014 Commands out of sync; you can‘t run this command now;

参考https://blog.csdn.net/ice4026/article/details/37592715

需要使用cursor.nextset(),或者断开connect;

在mysqlclient中的cursor.callproc方法中有一段注释:

Compatibility warning: The act of calling a stored procedure
itself creates an empty result set. This appears after any
result sets generated by the procedure. This is non-standard
behavior with respect to the DB-API. Be sure to use nextset()
to advance through all result sets; otherwise you may get
disconnected.

 

使用mysqlclient执行存储过程报错2014 Commands out of sync; you can't run this command now

原文:https://www.cnblogs.com/shouwangrenjian/p/12505799.html


如果您也喜欢它,动动您的小指点个赞吧

除非注明,文章均由 laddyq.com 整理发布,欢迎转载。

转载请注明:
链接:http://laddyq.com
来源:laddyq.com
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


联系我
置顶