The cursor's connection has been closed
程序员文章站
2022-03-29 18:41:19
...
今天在做django开发的时候遇到了这个问题,因为我是用sql_server,解决办法就是把下面两个语句放到一起就ok了
问题分析:
可能是因为我在处理上下文的时候函数只调用函数体里面的东西,get不到游标,我猜测的,我也不知道咋回事,要是遇到这个问题了,按照我说的试试。
cursor = connection.cursor()
cursor.execute("select * from MEMBER where mno={}".format(account)) # 获取昵称
上一篇: 扩展符
推荐阅读
-
MongoDB---出现no write has been done on this connection解决
-
Websocket发送信息报错The WebSocket session [0] has been closed and no method (apart from close()) may be c
-
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. If your s
-
connection-Connection has been abandoned :java.lang.Exception
-
connection-Connection has been abandoned :java.lang.Exception
-
Finalizing a Cursor that has not been deactivated or closed
-
The cursor's connection has been closed